You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Dmitry Vasilenko <dv...@gmail.com> on 2016/01/13 18:10:10 UTC

Does Atlas really support Gremlin queries?

Dear developers:

I am trying to create a query that includes order by and limit the result
to a single instance and as Atlas DSL
does not  support ORDER BY and LIMIT I am trying to use Gremlin.

The simple Gremlin query like

g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9" ).toList()

works just fine but anything a bit more complex that includes
order().by(...).limit(1) fails miserably with QueryParsingException.

I would naively think that the Gremlin syntax like this should be
well-formed and perfectly valid:

g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
).order().by("name").limit(1).toList()

but unfortunately it does not work (QueryParsingException)

Does any one know how the Gremlin query with order().by() .... limit(1)
should look like to be palatable by Atlas?


Regards
Dmitry Vasilenko

Re: Does Atlas really support Gremlin queries?

Posted by Dmitry Vasilenko <dv...@gmail.com>.
We tested this query (using the real names and values) directly with Atlas
using

http://localhost:21000/api/atlas/discovery/search/gremlin?query=.....

and the returned JSON result was what we expected. So the current plan is
to stick with Gremlin for our needs and switch to a new DSL when ATLAS-435
and ATLAS-436 are implemented.

On Tue, Jan 19, 2016 at 2:47 PM, Seetharam Venkatesh <
venkatesh@innerzeal.com> wrote:

> Gremlin is quite notorious and does not work always. But clearly, using
> Gremlin is quite leaky as you can see and hence my preference over the DSL.
>
> Wrt to your code, we have had issues with OR operator. Can you test this on
> a sample GSON and load it into gremlin and test this script. Thats how we
> verified every query in the DSL to gremlin translation layer.
>
> Once it works in gremlin, you can then send it across to Atlas and it
> should work.
>
> Makes sense?
>
> On Tue, Jan 19, 2016 at 12:36 PM Dmitry Vasilenko <dv...@gmail.com>
> wrote:
>
> > Thanks a lot, looking forward to the Atlas DSL API that has support for
> > ORDER BY and LIMIT.
> >
> > In the mean time here is the sample of the Gremlin query we have to use:
> >
> >  g.V().and(
> >   _().has('__typeName', T.eq, 'XXXXX'),
> >   _().or(
> >      _().has('__traitNames',
> > com.thinkaurelius.titan.core.attribute.Text.CONTAINS, 'YYYY') ,
> >      _().has('__traitNames',
> > com.thinkaurelius.titan.core.attribute.Text.CONTAINS, 'KKKKK') )  ,
> >    _().has('GGGGGGG', T.eq, "ppppppp") ,
> >    _().has('KKKKKKK', T.gte, 1452702737671),
> >    _().has('DDDDDDDDD', T.eq, 'mmmmm')).
> >    sort{'__timestamp'}_()[0].toList()
> >
> > for the task at hand. Took some time to figure out the exact syntax but
> it
> > works now.
> >
> > Regards
> > Dmitry
> >
> >
> >
> >
> > On Tue, Jan 19, 2016 at 2:27 PM, Seetharam Venkatesh <
> > venkatesh@innerzeal.com> wrote:
> >
> > > I added Gremlin and Rexster APIs as an experiment and mostly for
> testing
> > > instead of pointing Titan to the DB instance outside. I should have
> > > annotated them as LimitedPrivate to avoid confusion.
> > >
> > > If you notice, Gremlin is a pass-through today and we did not intend to
> > > support it in the long run. Atlas DSL is rich and type-aware. We should
> > > enhance the DSL and provide the features that you are asking for.
> > >
> > > Rexster is also a read-only API that I thought was removed.
> > >
> > > Thanks!
> > >
> > > Venkatesh
> > >
> > > On Mon, Jan 18, 2016 at 6:00 AM Dmitry Vasilenko <dv...@gmail.com>
> > > wrote:
> > >
> > > > Hi Hemanth,
> > > >
> > > > The Atlas DSL API does not support ORDER BY and LIMIT as of yet. It
> > > returns
> > > > the complete result set and does not scale well if you have a lot of
> > > data.
> > > >
> > > > See also
> > > > https://issues.apache.org/jira/browse/ATLAS-435
> > > > https://issues.apache.org/jira/browse/ATLAS-436
> > > >
> > > > Pagination
> > > > https://issues.apache.org/jira/browse/ATLAS-347
> > > > is definitely nice to have but it forces the client to filter out the
> > > > results instead of pushing the processing to the server.
> > > >
> > > > If the DSL is extended to support ORDER BY and LIMIT it will be the
> > > > preferable way to search the repository but until that functionality
> is
> > > > implemented using Gremlin queries seems to be the only option.
> > > >
> > > > Regards
> > > > Dmitry
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Sun, Jan 17, 2016 at 10:38 PM, Hemanth Yamijala <
> > > > hyamijala@hortonworks.com> wrote:
> > > >
> > > > > Dmitry,
> > > > >
> > > > > Apologies upfront for a possibly not very helpful response. This is
> > > more
> > > > > to understand from a product perspective.
> > > > >
> > > > > Could you tell us what your motivation is to go directly with
> Gremlin
> > > as
> > > > > opposed to either going through the UI or the DSL API? Are there
> > things
> > > > > that you would like to see in either that are not currently
> > supported?
> > > > For
> > > > > example, I know that the current REST APIs do not restrict number
> of
> > > > > results and had opened
> > https://issues.apache.org/jira/browse/ATLAS-347
> > > > > for this. Are there enhancements like this that would help using
> > Atlas
> > > > > easier?
> > > > >
> > > > > Or do you prefer the Gremlin queries for some other reason?
> > > > >
> > > > > Thanks
> > > > > hemanth
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com>
> wrote:
> > > > >
> > > > > >Dear developers:
> > > > > >
> > > > > >I am trying to create a query that includes order by and limit the
> > > > result
> > > > > >to a single instance and as Atlas DSL
> > > > > >does not  support ORDER BY and LIMIT I am trying to use Gremlin.
> > > > > >
> > > > > >The simple Gremlin query like
> > > > > >
> > > > > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> > ).toList()
> > > > > >
> > > > > >works just fine but anything a bit more complex that includes
> > > > > >order().by(...).limit(1) fails miserably with
> QueryParsingException.
> > > > > >
> > > > > >I would naively think that the Gremlin syntax like this should be
> > > > > >well-formed and perfectly valid:
> > > > > >
> > > > > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> > > > > >).order().by("name").limit(1).toList()
> > > > > >
> > > > > >but unfortunately it does not work (QueryParsingException)
> > > > > >
> > > > > >Does any one know how the Gremlin query with order().by() ....
> > > limit(1)
> > > > > >should look like to be palatable by Atlas?
> > > > > >
> > > > > >
> > > > > >Regards
> > > > > >Dmitry Vasilenko
> > > > >
> > > >
> > >
> >
>

Re: Does Atlas really support Gremlin queries?

Posted by Seetharam Venkatesh <ve...@innerzeal.com>.
Gremlin is quite notorious and does not work always. But clearly, using
Gremlin is quite leaky as you can see and hence my preference over the DSL.

Wrt to your code, we have had issues with OR operator. Can you test this on
a sample GSON and load it into gremlin and test this script. Thats how we
verified every query in the DSL to gremlin translation layer.

Once it works in gremlin, you can then send it across to Atlas and it
should work.

Makes sense?

On Tue, Jan 19, 2016 at 12:36 PM Dmitry Vasilenko <dv...@gmail.com>
wrote:

> Thanks a lot, looking forward to the Atlas DSL API that has support for
> ORDER BY and LIMIT.
>
> In the mean time here is the sample of the Gremlin query we have to use:
>
>  g.V().and(
>   _().has('__typeName', T.eq, 'XXXXX'),
>   _().or(
>      _().has('__traitNames',
> com.thinkaurelius.titan.core.attribute.Text.CONTAINS, 'YYYY') ,
>      _().has('__traitNames',
> com.thinkaurelius.titan.core.attribute.Text.CONTAINS, 'KKKKK') )  ,
>    _().has('GGGGGGG', T.eq, "ppppppp") ,
>    _().has('KKKKKKK', T.gte, 1452702737671),
>    _().has('DDDDDDDDD', T.eq, 'mmmmm')).
>    sort{'__timestamp'}_()[0].toList()
>
> for the task at hand. Took some time to figure out the exact syntax but it
> works now.
>
> Regards
> Dmitry
>
>
>
>
> On Tue, Jan 19, 2016 at 2:27 PM, Seetharam Venkatesh <
> venkatesh@innerzeal.com> wrote:
>
> > I added Gremlin and Rexster APIs as an experiment and mostly for testing
> > instead of pointing Titan to the DB instance outside. I should have
> > annotated them as LimitedPrivate to avoid confusion.
> >
> > If you notice, Gremlin is a pass-through today and we did not intend to
> > support it in the long run. Atlas DSL is rich and type-aware. We should
> > enhance the DSL and provide the features that you are asking for.
> >
> > Rexster is also a read-only API that I thought was removed.
> >
> > Thanks!
> >
> > Venkatesh
> >
> > On Mon, Jan 18, 2016 at 6:00 AM Dmitry Vasilenko <dv...@gmail.com>
> > wrote:
> >
> > > Hi Hemanth,
> > >
> > > The Atlas DSL API does not support ORDER BY and LIMIT as of yet. It
> > returns
> > > the complete result set and does not scale well if you have a lot of
> > data.
> > >
> > > See also
> > > https://issues.apache.org/jira/browse/ATLAS-435
> > > https://issues.apache.org/jira/browse/ATLAS-436
> > >
> > > Pagination
> > > https://issues.apache.org/jira/browse/ATLAS-347
> > > is definitely nice to have but it forces the client to filter out the
> > > results instead of pushing the processing to the server.
> > >
> > > If the DSL is extended to support ORDER BY and LIMIT it will be the
> > > preferable way to search the repository but until that functionality is
> > > implemented using Gremlin queries seems to be the only option.
> > >
> > > Regards
> > > Dmitry
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Sun, Jan 17, 2016 at 10:38 PM, Hemanth Yamijala <
> > > hyamijala@hortonworks.com> wrote:
> > >
> > > > Dmitry,
> > > >
> > > > Apologies upfront for a possibly not very helpful response. This is
> > more
> > > > to understand from a product perspective.
> > > >
> > > > Could you tell us what your motivation is to go directly with Gremlin
> > as
> > > > opposed to either going through the UI or the DSL API? Are there
> things
> > > > that you would like to see in either that are not currently
> supported?
> > > For
> > > > example, I know that the current REST APIs do not restrict number of
> > > > results and had opened
> https://issues.apache.org/jira/browse/ATLAS-347
> > > > for this. Are there enhancements like this that would help using
> Atlas
> > > > easier?
> > > >
> > > > Or do you prefer the Gremlin queries for some other reason?
> > > >
> > > > Thanks
> > > > hemanth
> > > >
> > > >
> > > >
> > > >
> > > > On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:
> > > >
> > > > >Dear developers:
> > > > >
> > > > >I am trying to create a query that includes order by and limit the
> > > result
> > > > >to a single instance and as Atlas DSL
> > > > >does not  support ORDER BY and LIMIT I am trying to use Gremlin.
> > > > >
> > > > >The simple Gremlin query like
> > > > >
> > > > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> ).toList()
> > > > >
> > > > >works just fine but anything a bit more complex that includes
> > > > >order().by(...).limit(1) fails miserably with QueryParsingException.
> > > > >
> > > > >I would naively think that the Gremlin syntax like this should be
> > > > >well-formed and perfectly valid:
> > > > >
> > > > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> > > > >).order().by("name").limit(1).toList()
> > > > >
> > > > >but unfortunately it does not work (QueryParsingException)
> > > > >
> > > > >Does any one know how the Gremlin query with order().by() ....
> > limit(1)
> > > > >should look like to be palatable by Atlas?
> > > > >
> > > > >
> > > > >Regards
> > > > >Dmitry Vasilenko
> > > >
> > >
> >
>

Re: Does Atlas really support Gremlin queries?

Posted by Dmitry Vasilenko <dv...@gmail.com>.
Thanks a lot, looking forward to the Atlas DSL API that has support for
ORDER BY and LIMIT.

In the mean time here is the sample of the Gremlin query we have to use:

 g.V().and(
  _().has('__typeName', T.eq, 'XXXXX'),
  _().or(
     _().has('__traitNames',
com.thinkaurelius.titan.core.attribute.Text.CONTAINS, 'YYYY') ,
     _().has('__traitNames',
com.thinkaurelius.titan.core.attribute.Text.CONTAINS, 'KKKKK') )  ,
   _().has('GGGGGGG', T.eq, "ppppppp") ,
   _().has('KKKKKKK', T.gte, 1452702737671),
   _().has('DDDDDDDDD', T.eq, 'mmmmm')).
   sort{'__timestamp'}_()[0].toList()

for the task at hand. Took some time to figure out the exact syntax but it
works now.

Regards
Dmitry




On Tue, Jan 19, 2016 at 2:27 PM, Seetharam Venkatesh <
venkatesh@innerzeal.com> wrote:

> I added Gremlin and Rexster APIs as an experiment and mostly for testing
> instead of pointing Titan to the DB instance outside. I should have
> annotated them as LimitedPrivate to avoid confusion.
>
> If you notice, Gremlin is a pass-through today and we did not intend to
> support it in the long run. Atlas DSL is rich and type-aware. We should
> enhance the DSL and provide the features that you are asking for.
>
> Rexster is also a read-only API that I thought was removed.
>
> Thanks!
>
> Venkatesh
>
> On Mon, Jan 18, 2016 at 6:00 AM Dmitry Vasilenko <dv...@gmail.com>
> wrote:
>
> > Hi Hemanth,
> >
> > The Atlas DSL API does not support ORDER BY and LIMIT as of yet. It
> returns
> > the complete result set and does not scale well if you have a lot of
> data.
> >
> > See also
> > https://issues.apache.org/jira/browse/ATLAS-435
> > https://issues.apache.org/jira/browse/ATLAS-436
> >
> > Pagination
> > https://issues.apache.org/jira/browse/ATLAS-347
> > is definitely nice to have but it forces the client to filter out the
> > results instead of pushing the processing to the server.
> >
> > If the DSL is extended to support ORDER BY and LIMIT it will be the
> > preferable way to search the repository but until that functionality is
> > implemented using Gremlin queries seems to be the only option.
> >
> > Regards
> > Dmitry
> >
> >
> >
> >
> >
> >
> >
> > On Sun, Jan 17, 2016 at 10:38 PM, Hemanth Yamijala <
> > hyamijala@hortonworks.com> wrote:
> >
> > > Dmitry,
> > >
> > > Apologies upfront for a possibly not very helpful response. This is
> more
> > > to understand from a product perspective.
> > >
> > > Could you tell us what your motivation is to go directly with Gremlin
> as
> > > opposed to either going through the UI or the DSL API? Are there things
> > > that you would like to see in either that are not currently supported?
> > For
> > > example, I know that the current REST APIs do not restrict number of
> > > results and had opened https://issues.apache.org/jira/browse/ATLAS-347
> > > for this. Are there enhancements like this that would help using Atlas
> > > easier?
> > >
> > > Or do you prefer the Gremlin queries for some other reason?
> > >
> > > Thanks
> > > hemanth
> > >
> > >
> > >
> > >
> > > On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:
> > >
> > > >Dear developers:
> > > >
> > > >I am trying to create a query that includes order by and limit the
> > result
> > > >to a single instance and as Atlas DSL
> > > >does not  support ORDER BY and LIMIT I am trying to use Gremlin.
> > > >
> > > >The simple Gremlin query like
> > > >
> > > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9" ).toList()
> > > >
> > > >works just fine but anything a bit more complex that includes
> > > >order().by(...).limit(1) fails miserably with QueryParsingException.
> > > >
> > > >I would naively think that the Gremlin syntax like this should be
> > > >well-formed and perfectly valid:
> > > >
> > > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> > > >).order().by("name").limit(1).toList()
> > > >
> > > >but unfortunately it does not work (QueryParsingException)
> > > >
> > > >Does any one know how the Gremlin query with order().by() ....
> limit(1)
> > > >should look like to be palatable by Atlas?
> > > >
> > > >
> > > >Regards
> > > >Dmitry Vasilenko
> > >
> >
>

Re: Does Atlas really support Gremlin queries?

Posted by Seetharam Venkatesh <ve...@innerzeal.com>.
I added Gremlin and Rexster APIs as an experiment and mostly for testing
instead of pointing Titan to the DB instance outside. I should have
annotated them as LimitedPrivate to avoid confusion.

If you notice, Gremlin is a pass-through today and we did not intend to
support it in the long run. Atlas DSL is rich and type-aware. We should
enhance the DSL and provide the features that you are asking for.

Rexster is also a read-only API that I thought was removed.

Thanks!

Venkatesh

On Mon, Jan 18, 2016 at 6:00 AM Dmitry Vasilenko <dv...@gmail.com> wrote:

> Hi Hemanth,
>
> The Atlas DSL API does not support ORDER BY and LIMIT as of yet. It returns
> the complete result set and does not scale well if you have a lot of data.
>
> See also
> https://issues.apache.org/jira/browse/ATLAS-435
> https://issues.apache.org/jira/browse/ATLAS-436
>
> Pagination
> https://issues.apache.org/jira/browse/ATLAS-347
> is definitely nice to have but it forces the client to filter out the
> results instead of pushing the processing to the server.
>
> If the DSL is extended to support ORDER BY and LIMIT it will be the
> preferable way to search the repository but until that functionality is
> implemented using Gremlin queries seems to be the only option.
>
> Regards
> Dmitry
>
>
>
>
>
>
>
> On Sun, Jan 17, 2016 at 10:38 PM, Hemanth Yamijala <
> hyamijala@hortonworks.com> wrote:
>
> > Dmitry,
> >
> > Apologies upfront for a possibly not very helpful response. This is more
> > to understand from a product perspective.
> >
> > Could you tell us what your motivation is to go directly with Gremlin as
> > opposed to either going through the UI or the DSL API? Are there things
> > that you would like to see in either that are not currently supported?
> For
> > example, I know that the current REST APIs do not restrict number of
> > results and had opened https://issues.apache.org/jira/browse/ATLAS-347
> > for this. Are there enhancements like this that would help using Atlas
> > easier?
> >
> > Or do you prefer the Gremlin queries for some other reason?
> >
> > Thanks
> > hemanth
> >
> >
> >
> >
> > On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:
> >
> > >Dear developers:
> > >
> > >I am trying to create a query that includes order by and limit the
> result
> > >to a single instance and as Atlas DSL
> > >does not  support ORDER BY and LIMIT I am trying to use Gremlin.
> > >
> > >The simple Gremlin query like
> > >
> > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9" ).toList()
> > >
> > >works just fine but anything a bit more complex that includes
> > >order().by(...).limit(1) fails miserably with QueryParsingException.
> > >
> > >I would naively think that the Gremlin syntax like this should be
> > >well-formed and perfectly valid:
> > >
> > >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> > >).order().by("name").limit(1).toList()
> > >
> > >but unfortunately it does not work (QueryParsingException)
> > >
> > >Does any one know how the Gremlin query with order().by() .... limit(1)
> > >should look like to be palatable by Atlas?
> > >
> > >
> > >Regards
> > >Dmitry Vasilenko
> >
>

Re: Does Atlas really support Gremlin queries?

Posted by Hemanth Yamijala <hy...@hortonworks.com>.
Sure, Dmitry. Thanks for your response and helping us understand the need.

We’ll see how best to satisfy these requirements.

Thanks
Hemanth




On 1/18/16, 7:29 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:

>Hi Hemanth,
>
>The Atlas DSL API does not support ORDER BY and LIMIT as of yet. It returns
>the complete result set and does not scale well if you have a lot of data.
>
>See also
>https://issues.apache.org/jira/browse/ATLAS-435
>https://issues.apache.org/jira/browse/ATLAS-436
>
>Pagination
>https://issues.apache.org/jira/browse/ATLAS-347
>is definitely nice to have but it forces the client to filter out the
>results instead of pushing the processing to the server.
>
>If the DSL is extended to support ORDER BY and LIMIT it will be the
>preferable way to search the repository but until that functionality is
>implemented using Gremlin queries seems to be the only option.
>
>Regards
>Dmitry
>
>
>
>
>
>
>
>On Sun, Jan 17, 2016 at 10:38 PM, Hemanth Yamijala <
>hyamijala@hortonworks.com> wrote:
>
>> Dmitry,
>>
>> Apologies upfront for a possibly not very helpful response. This is more
>> to understand from a product perspective.
>>
>> Could you tell us what your motivation is to go directly with Gremlin as
>> opposed to either going through the UI or the DSL API? Are there things
>> that you would like to see in either that are not currently supported? For
>> example, I know that the current REST APIs do not restrict number of
>> results and had opened https://issues.apache.org/jira/browse/ATLAS-347
>> for this. Are there enhancements like this that would help using Atlas
>> easier?
>>
>> Or do you prefer the Gremlin queries for some other reason?
>>
>> Thanks
>> hemanth
>>
>>
>>
>>
>> On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:
>>
>> >Dear developers:
>> >
>> >I am trying to create a query that includes order by and limit the result
>> >to a single instance and as Atlas DSL
>> >does not  support ORDER BY and LIMIT I am trying to use Gremlin.
>> >
>> >The simple Gremlin query like
>> >
>> >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9" ).toList()
>> >
>> >works just fine but anything a bit more complex that includes
>> >order().by(...).limit(1) fails miserably with QueryParsingException.
>> >
>> >I would naively think that the Gremlin syntax like this should be
>> >well-formed and perfectly valid:
>> >
>> >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
>> >).order().by("name").limit(1).toList()
>> >
>> >but unfortunately it does not work (QueryParsingException)
>> >
>> >Does any one know how the Gremlin query with order().by() .... limit(1)
>> >should look like to be palatable by Atlas?
>> >
>> >
>> >Regards
>> >Dmitry Vasilenko
>>

Re: Does Atlas really support Gremlin queries?

Posted by Dmitry Vasilenko <dv...@gmail.com>.
Hi Hemanth,

The Atlas DSL API does not support ORDER BY and LIMIT as of yet. It returns
the complete result set and does not scale well if you have a lot of data.

See also
https://issues.apache.org/jira/browse/ATLAS-435
https://issues.apache.org/jira/browse/ATLAS-436

Pagination
https://issues.apache.org/jira/browse/ATLAS-347
is definitely nice to have but it forces the client to filter out the
results instead of pushing the processing to the server.

If the DSL is extended to support ORDER BY and LIMIT it will be the
preferable way to search the repository but until that functionality is
implemented using Gremlin queries seems to be the only option.

Regards
Dmitry







On Sun, Jan 17, 2016 at 10:38 PM, Hemanth Yamijala <
hyamijala@hortonworks.com> wrote:

> Dmitry,
>
> Apologies upfront for a possibly not very helpful response. This is more
> to understand from a product perspective.
>
> Could you tell us what your motivation is to go directly with Gremlin as
> opposed to either going through the UI or the DSL API? Are there things
> that you would like to see in either that are not currently supported? For
> example, I know that the current REST APIs do not restrict number of
> results and had opened https://issues.apache.org/jira/browse/ATLAS-347
> for this. Are there enhancements like this that would help using Atlas
> easier?
>
> Or do you prefer the Gremlin queries for some other reason?
>
> Thanks
> hemanth
>
>
>
>
> On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:
>
> >Dear developers:
> >
> >I am trying to create a query that includes order by and limit the result
> >to a single instance and as Atlas DSL
> >does not  support ORDER BY and LIMIT I am trying to use Gremlin.
> >
> >The simple Gremlin query like
> >
> >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9" ).toList()
> >
> >works just fine but anything a bit more complex that includes
> >order().by(...).limit(1) fails miserably with QueryParsingException.
> >
> >I would naively think that the Gremlin syntax like this should be
> >well-formed and perfectly valid:
> >
> >g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
> >).order().by("name").limit(1).toList()
> >
> >but unfortunately it does not work (QueryParsingException)
> >
> >Does any one know how the Gremlin query with order().by() .... limit(1)
> >should look like to be palatable by Atlas?
> >
> >
> >Regards
> >Dmitry Vasilenko
>

Re: Does Atlas really support Gremlin queries?

Posted by Hemanth Yamijala <hy...@hortonworks.com>.
Dmitry,

Apologies upfront for a possibly not very helpful response. This is more to understand from a product perspective.

Could you tell us what your motivation is to go directly with Gremlin as opposed to either going through the UI or the DSL API? Are there things that you would like to see in either that are not currently supported? For example, I know that the current REST APIs do not restrict number of results and had opened https://issues.apache.org/jira/browse/ATLAS-347 for this. Are there enhancements like this that would help using Atlas easier?

Or do you prefer the Gremlin queries for some other reason?

Thanks
hemanth




On 1/13/16, 10:40 PM, "Dmitry Vasilenko" <dv...@gmail.com> wrote:

>Dear developers:
>
>I am trying to create a query that includes order by and limit the result
>to a single instance and as Atlas DSL
>does not  support ORDER BY and LIMIT I am trying to use Gremlin.
>
>The simple Gremlin query like
>
>g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9" ).toList()
>
>works just fine but anything a bit more complex that includes
>order().by(...).limit(1) fails miserably with QueryParsingException.
>
>I would naively think that the Gremlin syntax like this should be
>well-formed and perfectly valid:
>
>g.V().has("__guid", "9b1329e0-12ff-4d45-ad51-9455e18736b9"
>).order().by("name").limit(1).toList()
>
>but unfortunately it does not work (QueryParsingException)
>
>Does any one know how the Gremlin query with order().by() .... limit(1)
>should look like to be palatable by Atlas?
>
>
>Regards
>Dmitry Vasilenko