Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Atlas Search API for querying by more than one type at at time

avatar
Explorer

Hi,

Use case is to search for a hive_table or a hive_column where name contains "customers" or description contains "customers" or comment contains "customers"

Using the search api : /v2/search/basic , we can achieve this for one particular type(hive_table) by using the following json. How can I query for both hive_table and hive_column in the same query ? Is it possible ?

One option is to use a full text search, But that will return me all the types (But, I am only interested in a subset of types)

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545} span.Apple-tab-span {white-space:pre}

{

"typeName": "hive_table”,

"excludeDeletedEntities": true,

"offset": 0,

"limit":25,

"entityFilters": {

"condition": "OR",

"criterion": [

{

"attributeName":"name",

"operator": "contains",

"attributeValue": "customer"

},

{

"attributeName":"comment",

"operator": "contains",

"attributeValue": "provider"

},

{

"attributeName":"description",

"operator": "contains",

"attributeValue": "provider"

}

]

},

"attributes": [ "db", "qualifiedName" ]

}

Thanks

1 ACCEPTED SOLUTION

avatar
Rising Star

Atlas search APIs don't support multiple typeNames in a single call. There were few requests to support this - both for entity-types and classification-types. Atlas team will look into this; but there is no concrete date/release for this enhancement. Until then, you will have to make 2 basic-search API calls - one for hive_table and another for hive_column. As you said, full-text may not be a good choice.

View solution in original post

1 REPLY 1

avatar
Rising Star

Atlas search APIs don't support multiple typeNames in a single call. There were few requests to support this - both for entity-types and classification-types. Atlas team will look into this; but there is no concrete date/release for this enhancement. Until then, you will have to make 2 basic-search API calls - one for hive_table and another for hive_column. As you said, full-text may not be a good choice.