You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Ayub Pathan (JIRA)" <ji...@apache.org> on 2017/06/14 10:11:00 UTC
[jira] [Created] (ATLAS-1874) V2 DSL search query does not support
for count() but v1 do.
Ayub Pathan created ATLAS-1874:
----------------------------------
Summary: V2 DSL search query does not support for count() but v1 do.
Key: ATLAS-1874
URL: https://issues.apache.org/jira/browse/ATLAS-1874
Project: Atlas
Issue Type: Bug
Components: atlas-core
Affects Versions: 0.8.1-incubating
Reporter: Ayub Pathan
Fix For: 0.9-incubating, 0.8.1-incubating
v1 DSL query supports count()
{noformat}
curl -u admin:admin 'http://ctr-e133-1493418528701-113468-01-000002.hwx.site:21000/api/atlas/discovery/search/dsl?query=hive_table%20where%20db.name%3D%22default%22%20select%20count()%20as%20%27count%27' | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 537 0 537 0 0 339 0 --:--:-- 0:00:01 --:--:-- 339
{
"count": 1,
"dataType": {
"attributeDefinitions": [
{
"dataTypeName": "long",
"isComposite": false,
"isIndexable": false,
"isUnique": false,
"multiplicity": {
"isUnique": false,
"lower": 0,
"upper": 1
},
"name": "count",
"reverseAttributeName": null
}
],
"typeDescription": null,
"typeName": "__tempQueryResultStruct286",
"typeVersion": "1.0"
},
"query": "hive_table where db.name=\"default\" select count() as 'count'",
"queryType": "dsl",
"requestId": "pool-2-thread-9 - 47389e3f-bbf1-4209-8e50-8a3235a7e5a9",
"results": [
{
"$typeName$": "__tempQueryResultStruct286",
"count": 68
}
]
}
{noformat}
v2 DSL search query does not
{noformat}
curl -u admin:admin 'http://ctr-e133-1493418528701-113468-01-000002.hwx.site:21000/api/atlas/v2/search/dsl?limit=25&excludeDeletedEntities=true&query=where+db.name%3D%22default%22+select+count()+as+%27count%27&typeName=hive_table&_=1497434602692' | python -m json.tool
{
"queryText": "`hive_table` where db.name=\"default\" select count() as 'count'",
"queryType": "DSL"
}
{noformat}
*From the initial analysis, it seems like, V2 API response does not have the count attribute which is cause for this failure.* might want to consider adding the count in V2?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)