Support Questions

Find answers, ask questions, and share your expertise

Where can we find the SQL syntax reference for Atlas Metadata search?

avatar
Expert Contributor

Atlas UI allows us to search for entities with SQL like syntax, for example 'table where name = "sales_fact"'. Is this SQL framework based on any existing libraries within Gremlin? Or was this custom built for Atlas?

Trying to understand if there is documentation on the proper SQL syntax for these searches?

Doc Reference: http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.2/bk_data_governance/content/section_metadata_...

1 ACCEPTED SOLUTION

avatar
4 REPLIES 4

avatar

avatar
New Contributor
Is this SQL framework based on any existing libraries within Gremlin? Or was this custom built for Atlas?

This is a custom syntax that translates to gremlin behind the scenes.

Trying to understand if there is documentation on the proper SQL syntax for these searches?

Search Syntax

avatar
Super Collaborator

Instead of calling it SQL, we can put it as DSL (Domain Specific Language) of Atlas.When the DSL query has any syntax error and is not properly formed, Atlas considers it as a Full text search.

Most commonly used DSL examples are :

1) hive_db where name = 'default' (Selecting the database knowing the name of the database)

2) hive_table where name='default.table_1@cluster1' (Selecting the table knowing the name of the table)

3) hive_table where name='db2.tab4@cluster1' select owner,name,createTime,comment,tableType (selecting attributes of a table)

4) from hive_table where name='default.table_1@cluster1',columns (listing all the columns of the table)

5) hive_table where db.name = 'default' (listing all tables in the database )

avatar
Contributor