Support Questions

Find answers, ask questions, and share your expertise

Select clause is not working in Atlas DSL

avatar
Rising Star

Hi,

Can anyone please help me in understanding SELECT clause in DSL? Following mentioned query returns no rows though there is an entity named as "Reporting" of type "DB" having attributes as name and owner.

DB where name="Reporting" select name, owner

screenshot-from-2017-07-10-17-49-58.png
1 ACCEPTED SOLUTION

avatar
Super Collaborator

@Saba Baig

The select lets you "select" a particular attribute of an entity

DB where name="Reporting" select name, owner

displays the name and owner of db whose name is "Reporting"

Currently UI doesn't display results but REST GET API call actually returns the result.

Example :

DSL query : hive_table name = "table1" select qualifiedName,owner

response :

{queryType: "DSL",
queryText: "`hive_table` name="table1" select qualifiedName,owner",
attributes: 
{name: 
["qualifiedName",
"owner"
],
values: 
[
["default.table1@cl1",
"atlas"
]
]
}
}

View solution in original post

15 REPLIES 15

avatar
Super Collaborator

@Saba Baig ,

>> But when I tried to the same search (Basic using query) I typed sales_fa?t and I got invalid Expression

What is the query you fired ?

You mentioned http://localhost:21000/api/atlas/v2/search/basic?limit=25∈cludeDeletedEntities=true&query=sales_fa?t... works for you. I am not able to get your question.

avatar
Rising Star

@Sharmadha Sainath I said that I got invalid expression when fired the same query in the Atlas UI for basic search using query. Here it gave me Invalid Expression for the same query (sales_fa?t) that worked via api as mentioned earlier.

avatar
Super Collaborator

avatar
Rising Star
@Sharmadha Sainath

You also mentioned that if we write anything in single quotes it gives you all the entities with that tag. I found this behaving the same in case of DSL (Advanced Search)

Search for `Fact` in Basic Search

19385-screenshot-from-2017-07-11-15-53-17.png

But, searching for `Fact` in Basic (Search by Query) behaved differently...

19386-screenshot-from-2017-07-11-15-36-14.png

Question 1: If we follow what you just said then why am I seeing Log Data and Metric appearing there?

Question 2: Secondly, you said "Only classification name is supported in single quotes." then,

2.1) What is a classification name?

2.2) Difference between tag and classification name?

2.3) What to mention in single quotes... Classification name or tag?

avatar
Super Collaborator

2.1) What is a classification name?

2.2) Difference between tag and classification name?

Classification and tags are same

Basic search is basically Lucene search . So ,If you see your result in the screenshot, basic search has returned everything related to fact.(i.e) entities with description containing fact.

avatar
Rising Star