[orientdb] Re: Can i connect to OrientDB database with Pentaho Data Integration?

2015-07-14 Thread Amrutha Valli
Hi Can you help me in connecting to orient from pentaho

On Tuesday, February 24, 2015 at 3:00:13 PM UTC+5:30, Gurpreet Singh wrote:
>
> I am new to OrientDB, i have a query weather i can connect to OrientDB 
> database using PDI. If it is possible using jar file can anyone provide me 
> the connection string.
>
> Thanks
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Implementing a queue in OrientDB

2015-07-14 Thread tech support
you can use a in memory grid hazelcast /gridgain , high performance
distributed queue

On Wed, Jul 15, 2015 at 10:38 AM, Riccardo Tasso 
wrote:

> Please, consider also Disque:
>
> http://antirez.com/news/88
>
> Cheers,
>Riccardo
> Il 15/lug/2015 05:50, "scott molinari"  ha
> scritto:
>
>> Maybe you would want to look at MongoDB for this use case, as it is very
>> special and Mongo fulfils it well. They have a collection type called
>> Capped collections, which has a built in FIFO feature. It has a fixed size,
>> so any data entering the collection causing it to grow larger than the
>> fixed size means old data gets pushed out automatically.
>>
>> https://docs.mongodb.org/manual/core/capped-collections/
>>
>> Scott
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to orient-database+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] DISTINCT on list

2015-07-14 Thread Ran Mizrachi
Hi,

I'm using v2.0.12.

I noticed that when I go like this it's working:
$conv = 
outE("HasPhoneNumber").inV().inE("WrittenAbout").outV("Conversation").asSet(), 

but when I apply the asSet() on another variable, it doesn't. e.g.:
$conv = 
outE("HasPhoneNumber").inV().inE("WrittenAbout").outV("Conversation"), 
$unique = $conv.asSet(), 



On Wednesday, July 15, 2015 at 8:40:34 AM UTC+3, Luigi Dell'Aquila wrote:
>
> Hi Ran,
>
> which OrientDB version? I think I fixed a similar issue (LET with 
> .asSet()) recently in develop branch
>
> Thanks
>
> Luigi
>
>
> 2015-07-14 21:12 GMT+02:00 Riccardo Tasso  >:
>
>> Try  with:
>>$unique = set($conv)
>>
>> Riccardo
>>
>> 2015-07-14 20:45 GMT+02:00 Ran Mizrachi 
>> >:
>>
>>> I already found this answer on google, but it didn't work.
>>>
>>> I get the following error:
>>> com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error 
>>> on parsing command at position #0: No function with name 'asset', available 
>>> names are : 
>>> [date,encode,distance,document,distinct,dijkstra,traversedelement,sum,decode,bothv,uuid,out,mode,sysdate,avg,min,shortestpath,traversededge,ifnull,symmetricdifference,traversedvertex,stddev,outv,if,map,bothe,unionall,ine,set,oute,intersect,last,max,in,coalesce,count,format,label,list,both,inv,gremlin,eval,percentile,median,variance,difference,first]
>>>
>>> What am I doing wrong?
>>>
>>>
>>> On Tuesday, July 14, 2015 at 9:41:32 PM UTC+3, Riccardo Tasso wrote:

 Hi,
   have you tried: $unique = $conv.asSet() ?

 Cheers,
Riccardo

 2015-07-14 20:24 GMT+02:00 Ran Mizrachi :

> Hi All,
>
> I'm trying to get distinct set in a query results but can't make it 
> work.
> I would appreciate your assistance.
>
> My query:
>
> select uid, name, $conv,  $unique
> from (select expand(outE("HasCard").inV()) from #12:1310)
> let 
> $conv = inV().inE().outV("Conversation"),  // I'm getting list of @rid 
> -> [#13:23, #13:23, #13:55]
> $unique = distinct($conv)  // trying to get [#13:23, #13:55]
>
> I also tried to change the last line to:
> $unique = (select @rid from Conversation where @rid in $conv)
> but it didn't work too.
>
> Thank you very much for helping!
>
> -- 
>
> --- 
> You received this message because you are subscribed to the Google 
> Groups "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to orient-databa...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

  -- 
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to orient-databa...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to orient-databa...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] RID Rules

2015-07-14 Thread Luigi Dell'Aquila
Hi Eric,

yes, you can rely on it, and actually sorting on RID is the most efficient
sorting you can do

Luigi


2015-07-15 3:44 GMT+02:00 Eric24 :

> I want to check my thinking on something: It is true that the RID of a new
> object of a particular class (V or E) will always be "greater than" any
> previous object's RID, regardless of how "distributed" the underlying
> database is? If so, can I rely on ORDERing by the RID to always return
> results in the order the objects were created? If so, I'm assuming that
> this would be the fastest way possible to get such an ordered result?
> --Eric
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Requested command 'create edge type *** as subclass of 'E'' must be executed outside active trans...

2015-07-14 Thread Luigi Dell'Aquila
Hi Jose,

an edge/vertex is just a document under the hood, so the memory cost is the
sum the size of all keys (strings) and values for the document properties.
In the storage (and in the disk cache) you have to expect an envelope of
about 50 bytes per single record

Luigi


2015-07-14 22:22 GMT+02:00 José Cornado :

> I will try the configs at runtime to avoid cluttering folders and jvm
> settings.
>
> Thanks for your help!!
>
>
> On Tuesday, July 14, 2015 at 10:18:09 AM UTC-6, José Cornado wrote:
>>
>> Hello again! :-}
>>
>> I am embedding your jars inside the plugin's dir. Should a "config" dir
>> inside that dir suffice? Another question what memory cost does a vertex,
>> edge have? I am trying to figure out a reasonable element count for bulk
>> operations.
>>
>> Thanks a lot!!!
>>
>> On Tuesday, July 14, 2015 at 7:17:48 AM UTC-6, Luigi Dell'Aquila wrote:
>>>
>>> Hi Jose,
>>>
>>> OrientDB uses default JDK logging functionalities, so you can just
>>> modify
>>>
>>> config/orientdb-client-log.properties
>>> config/orientdb-server-log.properties
>>>
>>> and change log levels
>>>
>>> Luigi
>>>
>>>
>>>
>>>
>>>
>>> 2015-07-14 15:00 GMT+02:00 José Cornado :
>>>
 A couple of questions:

 What does a transaction commit/rollback?

 Is there a way to mute the warning logs? redirect them to a file?

 I need to modify the graph structure on the fly. It  models source
 code. The model changes as the user creates/modifies tests.

 The UI thread captures the code paths  and values, writes to disk a
 vertex id and sends the rest of the work to the backgrounder that finishes
 the modeling.

 It sounds as if no TXs are needed.

 On Tuesday, July 14, 2015 at 1:18:44 AM UTC-6, Luigi Dell'Aquila wrote:
>
> Hi Josè,
>
> I'm not sure where the problem exactly is, but I can give you two
> pointers:
> 1) schema creation has to be managed outside of transaction, using
> OrientGraphNoTx
> 2) when you try to create an edge or a vertex, the driver checks
> whether the edge/vertex class exists, and in case it tries to create it
>
> My general suggestion is to check/create the schema when the plugin
> starts up, using an OrientGraphNoTx
>
> Thanks
>
> Luigi
>
>
> 2015-07-13 20:30 GMT+02:00 José Cornado :
>
>> Forgot to mention that I am running .12 on OSX 10.9 1.7 jvm. And
>> creating the instance as follows:
>>
>> OrientGraph("plocal:")
>>
>> On Monday, July 13, 2015 at 9:54:18 AM UTC-6, José Cornado wrote:
>>>
>>> First, great job! I am embedding the graph DB inside an eclipse
>>> plug-in and the startup and shutdown are really fast. It is hard to 
>>> notice
>>> that in addition to the plugin a DB is being used.
>>>
>>> Even when I do something wrong it fails quickly and gracefully.
>>>
>>> I have a question:
>>>
>>> As a rule of thumb I issue a begin/commit or rollback (commit if a
>>> write occurs rollback if it is only reading) every time I access the 
>>> graph.
>>> Two threads access the graph: the ui thread and the backgrounder. Even
>>> though when the exception occurs the ui thread is idle.
>>>
>>> The message is kind of puzzling. What I am missing?
>>>
>>> Thanks a lot!!
>>>
>>>
>>>
>>>
>>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to orient-databa...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --

 ---
 You received this message because you are subscribed to the Google
 Groups "OrientDB" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to orient-databa...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] DISTINCT on list

2015-07-14 Thread Luigi Dell'Aquila
Hi Ran,

which OrientDB version? I think I fixed a similar issue (LET with .asSet())
recently in develop branch

Thanks

Luigi


2015-07-14 21:12 GMT+02:00 Riccardo Tasso :

> Try  with:
>$unique = set($conv)
>
> Riccardo
>
> 2015-07-14 20:45 GMT+02:00 Ran Mizrachi :
>
>> I already found this answer on google, but it didn't work.
>>
>> I get the following error:
>> com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error
>> on parsing command at position #0: No function with name 'asset', available
>> names are :
>> [date,encode,distance,document,distinct,dijkstra,traversedelement,sum,decode,bothv,uuid,out,mode,sysdate,avg,min,shortestpath,traversededge,ifnull,symmetricdifference,traversedvertex,stddev,outv,if,map,bothe,unionall,ine,set,oute,intersect,last,max,in,coalesce,count,format,label,list,both,inv,gremlin,eval,percentile,median,variance,difference,first]
>>
>> What am I doing wrong?
>>
>>
>> On Tuesday, July 14, 2015 at 9:41:32 PM UTC+3, Riccardo Tasso wrote:
>>>
>>> Hi,
>>>   have you tried: $unique = $conv.asSet() ?
>>>
>>> Cheers,
>>>Riccardo
>>>
>>> 2015-07-14 20:24 GMT+02:00 Ran Mizrachi :
>>>
 Hi All,

 I'm trying to get distinct set in a query results but can't make it
 work.
 I would appreciate your assistance.

 My query:

 select uid, name, $conv,  $unique
 from (select expand(outE("HasCard").inV()) from #12:1310)
 let
 $conv = inV().inE().outV("Conversation"),  // I'm getting list of @rid
 -> [#13:23, #13:23, #13:55]
 $unique = distinct($conv)  // trying to get [#13:23, #13:55]

 I also tried to change the last line to:
 $unique = (select @rid from Conversation where @rid in $conv)
 but it didn't work too.

 Thank you very much for helping!

 --

 ---
 You received this message because you are subscribed to the Google
 Groups "OrientDB" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to orient-databa...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to orient-database+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Implementing a queue in OrientDB

2015-07-14 Thread Riccardo Tasso
Please, consider also Disque:

http://antirez.com/news/88

Cheers,
   Riccardo
Il 15/lug/2015 05:50, "scott molinari"  ha
scritto:

> Maybe you would want to look at MongoDB for this use case, as it is very
> special and Mongo fulfils it well. They have a collection type called
> Capped collections, which has a built in FIFO feature. It has a fixed size,
> so any data entering the collection causing it to grow larger than the
> fixed size means old data gets pushed out automatically.
>
> https://docs.mongodb.org/manual/core/capped-collections/
>
> Scott
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Logging for embedded OrientDB

2015-07-14 Thread José Cornado
Sorry for resurrecting this one.

I am embedding orientdb inside an eclipse plug-in and ran into the 
verbosity of the console logger. I am trying to mute most of the messages 
out. Just leaving the severe ones.

I tried 

System.setProperty("orientdb.installCustomFormatter", "false");

and 

OGlobalConfiguration.LOG_CONSOLE_LEVEL.setValue("ERROR");

before creating an instance of OrientGraph(plocal). No luck.


Suggestions? Pointers?


I am using .12. Thanks a lot in advance!!!







On Thursday, January 29, 2015 at 12:47:16 AM UTC-7, Gregor Frey wrote:
>
> sorry you din't see my update of my post yesterday. Everything works as 
> designed, when i use my local build of the 2.0.1 branch. it seems the fix 
> was not in the snapshot i downloaded. 
> Saluti 
> Gregor

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Implementing a queue in OrientDB

2015-07-14 Thread scott molinari
Maybe you would want to look at MongoDB for this use case, as it is very 
special and Mongo fulfils it well. They have a collection type called 
Capped collections, which has a built in FIFO feature. It has a fixed size, 
so any data entering the collection causing it to grow larger than the 
fixed size means old data gets pushed out automatically. 

https://docs.mongodb.org/manual/core/capped-collections/

Scott

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Implementing a queue in OrientDB

2015-07-14 Thread Eric24
A couple of follow-up thoughts:
1) The reason I don't want to use 0MQ/RabbitMQ/etc. is because I need a HA 
(durable, resilient, persistent) queue, so I can have very high confidence 
that no messages get lost.
2) There are some articles I've found that implement a queue like this 
using Redis, which is what got me thinking about using ODB for this; here's 
one: 
https://davidmarquis.wordpress.com/2013/01/03/reliable-delivery-message-queues-with-redis
3) As I understand it, a full Hazelcast instance is already "part of" an 
ODB deployment, right? It looks like Hazelcast would be make a very good HA 
queue. Is there any reason I can't just directly use the same Hazelcast 
instance as ODB uses?


On Monday, July 13, 2015 at 2:45:48 PM UTC-5, Eric24 wrote:
>
> Hi all--
> I'm looking for some advice on pros/cons/designs for implementing a queue 
> in ODB. The queue stores messages in a more-or-less FIFO manner based on 
> the individual message priority (an integer), with the possibility that 
> some messages may need to be retried over a period of time, but ultimately 
> all messages that are put into the queue will come out. In SQL, this was 
> fairly easily accomplished with a secondary index on the timestamp and 
> priority of the message row, so that a query to get the top message (i.e. 
> the best one to process and remove from the queue) based on these 
> parameters is fast and efficient (made more so by adding a READPAST hint 
> that will allow multiple threads to work on the queue at the same time 
> without blocking each other). I suppose in ODB, I could essentially 
> replicate this design, but I'm wondering if there's a better design 
> paradigm.
> --Eric
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] RID Rules

2015-07-14 Thread Eric24
I want to check my thinking on something: It is true that the RID of a new 
object of a particular class (V or E) will always be "greater than" any 
previous object's RID, regardless of how "distributed" the underlying 
database is? If so, can I rely on ORDERing by the RID to always return 
results in the order the objects were created? If so, I'm assuming that 
this would be the fastest way possible to get such an ordered result?
--Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Lucene index in a parent query

2015-07-14 Thread André Marques
Hi,

Is there a way to use the lucene index in a parent query?

e.g.:
Schema:
create class User extends V
create property User.name string
create index User_name on User(name) fulltext engine lucene
create class Group extends V
create class IsMemberOf extends E

Query:
select from (
  select expand(in("IsMemberOf")) from #27:3590 /*Group*/
)
where name lucene 'andre'

I'm asking about the lucene index but I noticed that it doesn't work with 
any index.

I'm using orientdb 2.0.12.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Requested command 'create edge type *** as subclass of 'E'' must be executed outside active trans...

2015-07-14 Thread José Cornado
I will try the configs at runtime to avoid cluttering folders and jvm 
settings.

Thanks for your help!!

On Tuesday, July 14, 2015 at 10:18:09 AM UTC-6, José Cornado wrote:
>
> Hello again! :-}
>
> I am embedding your jars inside the plugin's dir. Should a "config" dir 
> inside that dir suffice? Another question what memory cost does a vertex, 
> edge have? I am trying to figure out a reasonable element count for bulk 
> operations.
>
> Thanks a lot!!! 
>
> On Tuesday, July 14, 2015 at 7:17:48 AM UTC-6, Luigi Dell'Aquila wrote:
>>
>> Hi Jose,
>>
>> OrientDB uses default JDK logging functionalities, so you can just modify 
>>
>> config/orientdb-client-log.properties
>> config/orientdb-server-log.properties
>>
>> and change log levels
>>
>> Luigi
>>
>>
>>
>>
>>
>> 2015-07-14 15:00 GMT+02:00 José Cornado :
>>
>>> A couple of questions:
>>>
>>> What does a transaction commit/rollback?
>>>
>>> Is there a way to mute the warning logs? redirect them to a file?
>>>
>>> I need to modify the graph structure on the fly. It  models source code. 
>>> The model changes as the user creates/modifies tests.
>>>
>>> The UI thread captures the code paths  and values, writes to disk a 
>>> vertex id and sends the rest of the work to the backgrounder that finishes 
>>> the modeling.
>>>
>>> It sounds as if no TXs are needed.
>>>
>>> On Tuesday, July 14, 2015 at 1:18:44 AM UTC-6, Luigi Dell'Aquila wrote:

 Hi Josè,

 I'm not sure where the problem exactly is, but I can give you two 
 pointers:
 1) schema creation has to be managed outside of transaction, using 
 OrientGraphNoTx
 2) when you try to create an edge or a vertex, the driver checks 
 whether the edge/vertex class exists, and in case it tries to create it

 My general suggestion is to check/create the schema when the plugin 
 starts up, using an OrientGraphNoTx

 Thanks

 Luigi


 2015-07-13 20:30 GMT+02:00 José Cornado :

> Forgot to mention that I am running .12 on OSX 10.9 1.7 jvm. And 
> creating the instance as follows:
>
> OrientGraph("plocal:")
>
> On Monday, July 13, 2015 at 9:54:18 AM UTC-6, José Cornado wrote:
>>
>> First, great job! I am embedding the graph DB inside an eclipse 
>> plug-in and the startup and shutdown are really fast. It is hard to 
>> notice 
>> that in addition to the plugin a DB is being used.
>>
>> Even when I do something wrong it fails quickly and gracefully.
>>
>> I have a question: 
>>
>> As a rule of thumb I issue a begin/commit or rollback (commit if a 
>> write occurs rollback if it is only reading) every time I access the 
>> graph. 
>> Two threads access the graph: the ui thread and the backgrounder. Even 
>> though when the exception occurs the ui thread is idle.
>>
>> The message is kind of puzzling. What I am missing?
>>
>> Thanks a lot!!
>>
>>
>>
>>
>>  -- 
>
> --- 
> You received this message because you are subscribed to the Google 
> Groups "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to orient-databa...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

  -- 
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to orient-databa...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] DISTINCT on list

2015-07-14 Thread Riccardo Tasso
Try  with:
   $unique = set($conv)

Riccardo

2015-07-14 20:45 GMT+02:00 Ran Mizrachi :

> I already found this answer on google, but it didn't work.
>
> I get the following error:
> com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error
> on parsing command at position #0: No function with name 'asset', available
> names are :
> [date,encode,distance,document,distinct,dijkstra,traversedelement,sum,decode,bothv,uuid,out,mode,sysdate,avg,min,shortestpath,traversededge,ifnull,symmetricdifference,traversedvertex,stddev,outv,if,map,bothe,unionall,ine,set,oute,intersect,last,max,in,coalesce,count,format,label,list,both,inv,gremlin,eval,percentile,median,variance,difference,first]
>
> What am I doing wrong?
>
>
> On Tuesday, July 14, 2015 at 9:41:32 PM UTC+3, Riccardo Tasso wrote:
>>
>> Hi,
>>   have you tried: $unique = $conv.asSet() ?
>>
>> Cheers,
>>Riccardo
>>
>> 2015-07-14 20:24 GMT+02:00 Ran Mizrachi :
>>
>>> Hi All,
>>>
>>> I'm trying to get distinct set in a query results but can't make it work.
>>> I would appreciate your assistance.
>>>
>>> My query:
>>>
>>> select uid, name, $conv,  $unique
>>> from (select expand(outE("HasCard").inV()) from #12:1310)
>>> let
>>> $conv = inV().inE().outV("Conversation"),  // I'm getting list of @rid
>>> -> [#13:23, #13:23, #13:55]
>>> $unique = distinct($conv)  // trying to get [#13:23, #13:55]
>>>
>>> I also tried to change the last line to:
>>> $unique = (select @rid from Conversation where @rid in $conv)
>>> but it didn't work too.
>>>
>>> Thank you very much for helping!
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to orient-databa...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] DISTINCT on list

2015-07-14 Thread Ran Mizrachi
I already found this answer on google, but it didn't work.

I get the following error:
com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on 
parsing command at position #0: No function with name 'asset', available 
names are : 
[date,encode,distance,document,distinct,dijkstra,traversedelement,sum,decode,bothv,uuid,out,mode,sysdate,avg,min,shortestpath,traversededge,ifnull,symmetricdifference,traversedvertex,stddev,outv,if,map,bothe,unionall,ine,set,oute,intersect,last,max,in,coalesce,count,format,label,list,both,inv,gremlin,eval,percentile,median,variance,difference,first]

What am I doing wrong?


On Tuesday, July 14, 2015 at 9:41:32 PM UTC+3, Riccardo Tasso wrote:
>
> Hi,
>   have you tried: $unique = $conv.asSet() ?
>
> Cheers,
>Riccardo
>
> 2015-07-14 20:24 GMT+02:00 Ran Mizrachi >
> :
>
>> Hi All,
>>
>> I'm trying to get distinct set in a query results but can't make it work.
>> I would appreciate your assistance.
>>
>> My query:
>>
>> select uid, name, $conv,  $unique
>> from (select expand(outE("HasCard").inV()) from #12:1310)
>> let 
>> $conv = inV().inE().outV("Conversation"),  // I'm getting list of @rid -> 
>> [#13:23, #13:23, #13:55]
>> $unique = distinct($conv)  // trying to get [#13:23, #13:55]
>>
>> I also tried to change the last line to:
>> $unique = (select @rid from Conversation where @rid in $conv)
>> but it didn't work too.
>>
>> Thank you very much for helping!
>>
>> -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to orient-databa...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] DISTINCT on list

2015-07-14 Thread Riccardo Tasso
Hi,
  have you tried: $unique = $conv.asSet() ?

Cheers,
   Riccardo

2015-07-14 20:24 GMT+02:00 Ran Mizrachi :

> Hi All,
>
> I'm trying to get distinct set in a query results but can't make it work.
> I would appreciate your assistance.
>
> My query:
>
> select uid, name, $conv,  $unique
> from (select expand(outE("HasCard").inV()) from #12:1310)
> let
> $conv = inV().inE().outV("Conversation"),  // I'm getting list of @rid ->
> [#13:23, #13:23, #13:55]
> $unique = distinct($conv)  // trying to get [#13:23, #13:55]
>
> I also tried to change the last line to:
> $unique = (select @rid from Conversation where @rid in $conv)
> but it didn't work too.
>
> Thank you very much for helping!
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] DISTINCT on list

2015-07-14 Thread Ran Mizrachi
Hi All,

I'm trying to get distinct set in a query results but can't make it work.
I would appreciate your assistance.

My query:

select uid, name, $conv,  $unique
from (select expand(outE("HasCard").inV()) from #12:1310)
let 
$conv = inV().inE().outV("Conversation"),  // I'm getting list of @rid -> 
[#13:23, #13:23, #13:55]
$unique = distinct($conv)  // trying to get [#13:23, #13:55]

I also tried to change the last line to:
$unique = (select @rid from Conversation where @rid in $conv)
but it didn't work too.

Thank you very much for helping!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Time Series Java API example

2015-07-14 Thread Luca Garulli
Hi Simon,
Would you like to contribute on extending the documentation for further
users?

https://github.com/orientechnologies/orientdb-docs/blob/master/Time-series-use-case.md


Best Regards,

Founder & CEO
OrientDB 


On 14 July 2015 at 17:22, Simon White 
wrote:

>
> To summarise:**WORKING* TIME SERIES EXAMPLE*
>
> 1. Create linked Vertex with properties to linked hashmaps as per
> Alessandro's original post
>
> 2. Populate instances of days, weeks, etc
> //add a few year vertex
> for(int yy = 2015; yy < 2020; yy++) //will allow minus 2015 to the
> orid to query
> {
> //all months this year
> Map months = new HashMap<>();
>
> //add all the months
> for(int mm = 0; mm < 12; mm++) //developer gothcha - java
> months are 0 based!
> {
> //all days this month
> Map days = new HashMap<>();
>
> //add all the days in a month
> for(int dd = 1; dd < 32; dd++)
> {
> //all hours this day
> Map hours = new HashMap<>();
>
> //add all the hours in a day
> for(int i = 0; i < 24; i++)
> {
> OrientVertex hour = graph.addVertex("class:hour");
> hour.setProperty("log", new HashMap<>()); //new
> empty hashmap to hold the logs
> hour.setProperty("label", i + ":00 to " + i +
> ":59");
> hours.put(Integer.toString(i), hour);
> }
>
> //add days
> OrientVertex day = graph.addVertex("class:day");
> //link log with hour
> day.setProperty("hour", hours);
> day.setProperty("label", dd + "");
> days.put(Integer.toString(dd), day);
> }
>
> //add months
> OrientVertex month = graph.addVertex("class:month");
> //link day with hour
> month.setProperty("day", days);
> month.setProperty("label", new
> DateFormatSymbols().getMonths()[mm]);
> months.put(Integer.toString(mm), month);
> }
>
> //add years
> OrientVertex year = graph.addVertex("class:year");
> year.setProperty("label", Integer.toString(yy));
> //link year with month 
> year.setProperty("month", months);
> }
>
> 3. At runtime add logs with:
>
> *insert into log(priority) values ('very high')*
> *update hour add log =[#11:0] where @rid IN (select
> month[1].day[4].hour[6] from #12:0)*(thanks Luigi)
>
> 4. Query logs with
>
> *select month[10].day[12].hour[16].log from #12:0*
>
>
> or select expand (logentry) from (select month[10].day[12].hour[16].log as
> logentry from #1756:0)
>
> (#12:0 is the rid of the year, #11:0 is the rid of the log)
>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Requested command 'create edge type *** as subclass of 'E'' must be executed outside active trans...

2015-07-14 Thread José Cornado
Hello again! :-}

I am embedding your jars inside the plugin's dir. Should a "config" dir 
inside that dir suffice? Another question what memory cost does a vertex, 
edge have? I am trying to figure out a reasonable element count for bulk 
operations.

Thanks a lot!!! 

On Tuesday, July 14, 2015 at 7:17:48 AM UTC-6, Luigi Dell'Aquila wrote:
>
> Hi Jose,
>
> OrientDB uses default JDK logging functionalities, so you can just modify 
>
> config/orientdb-client-log.properties
> config/orientdb-server-log.properties
>
> and change log levels
>
> Luigi
>
>
>
>
>
> 2015-07-14 15:00 GMT+02:00 José Cornado 
> >:
>
>> A couple of questions:
>>
>> What does a transaction commit/rollback?
>>
>> Is there a way to mute the warning logs? redirect them to a file?
>>
>> I need to modify the graph structure on the fly. It  models source code. 
>> The model changes as the user creates/modifies tests.
>>
>> The UI thread captures the code paths  and values, writes to disk a 
>> vertex id and sends the rest of the work to the backgrounder that finishes 
>> the modeling.
>>
>> It sounds as if no TXs are needed.
>>
>> On Tuesday, July 14, 2015 at 1:18:44 AM UTC-6, Luigi Dell'Aquila wrote:
>>>
>>> Hi Josè,
>>>
>>> I'm not sure where the problem exactly is, but I can give you two 
>>> pointers:
>>> 1) schema creation has to be managed outside of transaction, using 
>>> OrientGraphNoTx
>>> 2) when you try to create an edge or a vertex, the driver checks whether 
>>> the edge/vertex class exists, and in case it tries to create it
>>>
>>> My general suggestion is to check/create the schema when the plugin 
>>> starts up, using an OrientGraphNoTx
>>>
>>> Thanks
>>>
>>> Luigi
>>>
>>>
>>> 2015-07-13 20:30 GMT+02:00 José Cornado :
>>>
 Forgot to mention that I am running .12 on OSX 10.9 1.7 jvm. And 
 creating the instance as follows:

 OrientGraph("plocal:")

 On Monday, July 13, 2015 at 9:54:18 AM UTC-6, José Cornado wrote:
>
> First, great job! I am embedding the graph DB inside an eclipse 
> plug-in and the startup and shutdown are really fast. It is hard to 
> notice 
> that in addition to the plugin a DB is being used.
>
> Even when I do something wrong it fails quickly and gracefully.
>
> I have a question: 
>
> As a rule of thumb I issue a begin/commit or rollback (commit if a 
> write occurs rollback if it is only reading) every time I access the 
> graph. 
> Two threads access the graph: the ui thread and the backgrounder. Even 
> though when the exception occurs the ui thread is idle.
>
> The message is kind of puzzling. What I am missing?
>
> Thanks a lot!!
>
>
>
>
>  -- 

 --- 
 You received this message because you are subscribed to the Google 
 Groups "OrientDB" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to orient-databa...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to orient-databa...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Time Series Java API example

2015-07-14 Thread Simon White

To summarise:**WORKING* TIME SERIES EXAMPLE*

1. Create linked Vertex with properties to linked hashmaps as per 
Alessandro's original post

2. Populate instances of days, weeks, etc 
//add a few year vertex
for(int yy = 2015; yy < 2020; yy++) //will allow minus 2015 to the 
orid to query 
{
//all months this year
Map months = new HashMap<>();

//add all the months
for(int mm = 0; mm < 12; mm++) //developer gothcha - java 
months are 0 based!
{
//all days this month
Map days = new HashMap<>();

//add all the days in a month
for(int dd = 1; dd < 32; dd++)
{
//all hours this day
Map hours = new HashMap<>();

//add all the hours in a day
for(int i = 0; i < 24; i++)
{
OrientVertex hour = graph.addVertex("class:hour");
hour.setProperty("log", new HashMap<>()); //new 
empty hashmap to hold the logs
hour.setProperty("label", i + ":00 to " + i + 
":59");
hours.put(Integer.toString(i), hour);
}

//add days
OrientVertex day = graph.addVertex("class:day");
//link log with hour
day.setProperty("hour", hours);
day.setProperty("label", dd + "");
days.put(Integer.toString(dd), day);
}

//add months
OrientVertex month = graph.addVertex("class:month");
//link day with hour
month.setProperty("day", days);
month.setProperty("label", new 
DateFormatSymbols().getMonths()[mm]);
months.put(Integer.toString(mm), month);
}

//add years
OrientVertex year = graph.addVertex("class:year");
year.setProperty("label", Integer.toString(yy));
//link year with month 
year.setProperty("month", months);
}

3. At runtime add logs with:

*insert into log(priority) values ('very high')*
*update hour add log =[#11:0] where @rid IN (select month[1].day[4].hour[6] 
from #12:0)*(thanks Luigi)

4. Query logs with

*select month[10].day[12].hour[16].log from #12:0*  
  


or select expand (logentry) from (select month[10].day[12].hour[16].log as 
logentry from #1756:0)

(#12:0 is the rid of the year, #11:0 is the rid of the log)


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Time Series Java API example

2015-07-14 Thread Simon White
Absolutely right Luigi, thank you for the tip!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Aggregation Performance on Orient DB

2015-07-14 Thread prakash27 . hosalli
Hi,


   I am new to Orient DB.

  Following are the structure for my Orient DB environment

vertex class


  1. Customers class extends V (With having 50,000)
  2. Order class extends V (With having 5,000,00)
  3. OrderDetails class extends V (With having 10,000,00)  


Edge Class
   
 1.custorderedge  class extend E( With having 5,000,00)
 1.orddetailsedge class extend E( With having 10,000,00)



All are vertex having the index.


When i query below one

1. select  sum(out('custorderedge').out('orddetailsedge').rate) as Sum_Rate 
from Customers where customerId <= 2 ==> Its taking 13.44 Seconds 

2. select sum(rate) from OrderDetails ==> Its taking 33.43 Seconds


Can anyone suggest me for better way to query above aggregation to get 
results in milliseconds.


Thanks 
Prakash Hosalli



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Update edge property

2015-07-14 Thread alessandrorota04
Hi,
you must use clause "in" because "select inE() from  where 
@rid = #13:0" returns a collection.

Alessandro

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Requested command 'create edge type *** as subclass of 'E'' must be executed outside active trans...

2015-07-14 Thread Luigi Dell'Aquila
Hi Jose,

OrientDB uses default JDK logging functionalities, so you can just modify

config/orientdb-client-log.properties
config/orientdb-server-log.properties

and change log levels

Luigi





2015-07-14 15:00 GMT+02:00 José Cornado :

> A couple of questions:
>
> What does a transaction commit/rollback?
>
> Is there a way to mute the warning logs? redirect them to a file?
>
> I need to modify the graph structure on the fly. It  models source code.
> The model changes as the user creates/modifies tests.
>
> The UI thread captures the code paths  and values, writes to disk a vertex
> id and sends the rest of the work to the backgrounder that finishes the
> modeling.
>
> It sounds as if no TXs are needed.
>
> On Tuesday, July 14, 2015 at 1:18:44 AM UTC-6, Luigi Dell'Aquila wrote:
>>
>> Hi Josè,
>>
>> I'm not sure where the problem exactly is, but I can give you two
>> pointers:
>> 1) schema creation has to be managed outside of transaction, using
>> OrientGraphNoTx
>> 2) when you try to create an edge or a vertex, the driver checks whether
>> the edge/vertex class exists, and in case it tries to create it
>>
>> My general suggestion is to check/create the schema when the plugin
>> starts up, using an OrientGraphNoTx
>>
>> Thanks
>>
>> Luigi
>>
>>
>> 2015-07-13 20:30 GMT+02:00 José Cornado :
>>
>>> Forgot to mention that I am running .12 on OSX 10.9 1.7 jvm. And
>>> creating the instance as follows:
>>>
>>> OrientGraph("plocal:")
>>>
>>> On Monday, July 13, 2015 at 9:54:18 AM UTC-6, José Cornado wrote:

 First, great job! I am embedding the graph DB inside an eclipse plug-in
 and the startup and shutdown are really fast. It is hard to notice that in
 addition to the plugin a DB is being used.

 Even when I do something wrong it fails quickly and gracefully.

 I have a question:

 As a rule of thumb I issue a begin/commit or rollback (commit if a
 write occurs rollback if it is only reading) every time I access the graph.
 Two threads access the graph: the ui thread and the backgrounder. Even
 though when the exception occurs the ui thread is idle.

 The message is kind of puzzling. What I am missing?

 Thanks a lot!!




  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to orient-databa...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Time Series Java API example

2015-07-14 Thread Luigi Dell'Aquila
Hi Simon,
I think you should use IN instead of = in the where condition:

update hour add log =[#11:4] where @rid IN (select month[1].day[4].hour[6]
from #67:0)

2015-07-14 14:55 GMT+02:00 Simon White :

> So close... missed the equals!!
>
> update hour add log =[#11:4] where @rid = (select month[1].day[4].hour[6]
> from #67:0)
>
> Is this right?
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Requested command 'create edge type *** as subclass of 'E'' must be executed outside active trans...

2015-07-14 Thread José Cornado
A couple of questions:

What does a transaction commit/rollback?

Is there a way to mute the warning logs? redirect them to a file?

I need to modify the graph structure on the fly. It  models source code. 
The model changes as the user creates/modifies tests.

The UI thread captures the code paths  and values, writes to disk a vertex 
id and sends the rest of the work to the backgrounder that finishes the 
modeling.

It sounds as if no TXs are needed.

On Tuesday, July 14, 2015 at 1:18:44 AM UTC-6, Luigi Dell'Aquila wrote:
>
> Hi Josè,
>
> I'm not sure where the problem exactly is, but I can give you two pointers:
> 1) schema creation has to be managed outside of transaction, using 
> OrientGraphNoTx
> 2) when you try to create an edge or a vertex, the driver checks whether 
> the edge/vertex class exists, and in case it tries to create it
>
> My general suggestion is to check/create the schema when the plugin starts 
> up, using an OrientGraphNoTx
>
> Thanks
>
> Luigi
>
>
> 2015-07-13 20:30 GMT+02:00 José Cornado 
> >:
>
>> Forgot to mention that I am running .12 on OSX 10.9 1.7 jvm. And creating 
>> the instance as follows:
>>
>> OrientGraph("plocal:")
>>
>> On Monday, July 13, 2015 at 9:54:18 AM UTC-6, José Cornado wrote:
>>>
>>> First, great job! I am embedding the graph DB inside an eclipse plug-in 
>>> and the startup and shutdown are really fast. It is hard to notice that in 
>>> addition to the plugin a DB is being used.
>>>
>>> Even when I do something wrong it fails quickly and gracefully.
>>>
>>> I have a question: 
>>>
>>> As a rule of thumb I issue a begin/commit or rollback (commit if a write 
>>> occurs rollback if it is only reading) every time I access the graph. Two 
>>> threads access the graph: the ui thread and the backgrounder. Even though 
>>> when the exception occurs the ui thread is idle.
>>>
>>> The message is kind of puzzling. What I am missing?
>>>
>>> Thanks a lot!!
>>>
>>>
>>>
>>>
>>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to orient-databa...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Time Series Java API example

2015-07-14 Thread Simon White
So close... missed the equals!!

update hour add log =[#11:4] where @rid = (select month[1].day[4].hour[6] 
from #67:0)

Is this right?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Update edge property

2015-07-14 Thread ben green


> Thanks for the suggestions and after a bit more research I found the 
> problem. Simple updates worked ok but conditional updates were not working 
> until I found the "in" clause which must be used in the where section and 
> not an = sign which gave me the following
>

update  set =66 where @rid in (select inE( 
from  where @rid = #13:0) 

I switched the '=' to 'in' and all works ok 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Time Series Java API example

2015-07-14 Thread Simon White
Thank you again, great answer, I am sorry I am not doing very well with 
this!

I think actually I have still populated my Vertex incorrectly, should I be 
doing nested loops so that essentially I generate a unique vertex for every 
unique hour in the year .. ??

Then what is the syntax to add the log entry...

#12:0 is the rid of the year
#11:4 is the rid of the log

Something like ...
update (select month[1].day[4].hour[6] from #12:0).@rid add logs [#11:4]

or

update hour add logs [#11:4] where @rid = (select month[1].day[4].hour[6] 
from #12:0)

but neither are correct!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Create hook transactional issue

2015-07-14 Thread Simon White
public static void createAndLinkWheels(String carOrid)
{
final ODatabaseDocumentInternal db = 
ODatabaseRecordThreadLocal.INSTANCE.get();

db.begin();

//insert wheel
ODocument wheel = new ODocument("wheel");
wheel.field( "type", "14");
wheel.save();

//link wheel
db.command(new OCommandSQL("create edge car_has_wheel from " + 
carOrid + " to " + wheel.getIdentity().toString())).execute();

db.commit();
}

public static void createAndLinkTyres(String wheelOrid)
{
final ODatabaseDocumentInternal db = 
ODatabaseRecordThreadLocal.INSTANCE.get();

db.begin();

//insert tyre
ODocument tyre = new ODocument("tyre");
tyre.field( "brand", "Michelin");
tyre.save();

//link tyre
db.command(new OCommandSQL("create edge wheel_has_tyre from " + 
wheelOrid + " to " + tyre.getIdentity().toString())).execute();

db.commit();
}

But wheelOrid comes in as negative and wheel.getIdentity().toString() is 
negative too!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Create hook transactional issue

2015-07-14 Thread Simon White

Yes I guess I am in the middle of a transaction, so whenever I create a Car 
i want to automatically create Wheel vertex and link them to Car, then 
whenever a Wheel is created (either independently or because a car was 
created) i want to create Tyre vertex and link them to Wheel

public void onRecordAfterCreate(ODocument iDocument)
{

if (iDocument.getClassName().equals("car"))
{
System.out.println(" CAR HOOK FIRED -");
createAndLinkWheels();
}

else if (iDocument.getClassName().equals("wheel"))
{
System.out.println(" WHEEL HOOK FIRED 
-");
createAndLinkTyres();
}
}

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Regarding Function calling from Java client

2015-07-14 Thread Giulia Brignoli
Hi Sourish,

For the first question, you have to cast instruction "sum.execute(3, 5)" of 
type Number (like this: (Number) sum.execute(3, 5) , because otherwise you 
will get an error.

However, for the second question it isn't very clear what would you do, can 
you explain better? 

Bye, 
Giulia

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Regarding Function calling from Java client

2015-07-14 Thread Sourish Dasgupta
Hi,

I have a different question. It seems that a function written in javascript 
when called by a java client returns Object. In that case, I do not see how 
this code, given in the documentation, makes sense in terms of type 
compatibility:

ODatabaseDocumentTx db = new ODatabaseDocumentTx("local:/tmp/db");
db.open("admin", "admin");
OFunction sum = db.getMetadata().getFunctionLibrary().getFunction("sum");
Number result = sum.execute(3, 5);

Can you please explain the last line? How can a Number variable refer to an 
Object instance? It might be so that I am mistaken grossly somewhere. 

I also find that we might be able to write a Java function in 
Orientdb provided we connect that with the SQL Engine. Is there a way to 
use OFunction object (in a similar way as for JS functions), instead of SQL 
query shooting, to execute the function?

Regards,

Sourish

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] QUERY LIMITS

2015-07-14 Thread Luca Garulli
Hi Ivan,
There are not limits in OrientDB, I think the only limit is 2^31 for the
size of the string.

Best Regards,

Founder & CEO
OrientDB 


On 13 July 2015 at 18:20, Ivan Plaza  wrote:

> Hi,
>
> Question: is there a size limit to a query string?
>
> I'm sending gremlin queries through the binary protocol (via node driver).
> At some point I may need to build a query with a large array of ids to
> fetch them from orientdb, I imagine there is some kind of limit to the size
> of the query I'm sending over to Orient?
>
> best
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Evaluating elapsed time for a query

2015-07-14 Thread Lasitha Weerasinghe
Hi all,

I want to *evaluate* a certain set of queries in orient db with indexes, 
without indexes and also with clustering in order to choose best way of 
storing data for my particular dataset.

Can I use the elapsed time from the *explain* command as a *reliable answer* 
or is there any better way of doing that.

Thank you.
Lasitha Weerasinghe

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Time Series Java API example

2015-07-14 Thread alessandrorota04
Hi Simon,
of course you can add a new log to a certain hour 

After create the log 
insert into log(priority) values ('very high')

you can update the hour and add the log that you have created
update #12:0 add logs= [#11:4]

#12:0 is the rid of the hour
#11:4 is the rid of the log

Regards,
Alessandro

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Update edge property

2015-07-14 Thread alessandrorota04
Hi,
try this example
update #18:0 set name='newName'

Regards,
Alessandro

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Update edge property

2015-07-14 Thread Giulia Brignoli
Hi.

try this.

update  set  = 

Bye.
Giulia

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Requested command 'create edge type *** as subclass of 'E'' must be executed outside active trans...

2015-07-14 Thread Luigi Dell'Aquila
Hi Josè,

I'm not sure where the problem exactly is, but I can give you two pointers:
1) schema creation has to be managed outside of transaction, using
OrientGraphNoTx
2) when you try to create an edge or a vertex, the driver checks whether
the edge/vertex class exists, and in case it tries to create it

My general suggestion is to check/create the schema when the plugin starts
up, using an OrientGraphNoTx

Thanks

Luigi


2015-07-13 20:30 GMT+02:00 José Cornado :

> Forgot to mention that I am running .12 on OSX 10.9 1.7 jvm. And creating
> the instance as follows:
>
> OrientGraph("plocal:")
>
> On Monday, July 13, 2015 at 9:54:18 AM UTC-6, José Cornado wrote:
>>
>> First, great job! I am embedding the graph DB inside an eclipse plug-in
>> and the startup and shutdown are really fast. It is hard to notice that in
>> addition to the plugin a DB is being used.
>>
>> Even when I do something wrong it fails quickly and gracefully.
>>
>> I have a question:
>>
>> As a rule of thumb I issue a begin/commit or rollback (commit if a write
>> occurs rollback if it is only reading) every time I access the graph. Two
>> threads access the graph: the ui thread and the backgrounder. Even though
>> when the exception occurs the ui thread is idle.
>>
>> The message is kind of puzzling. What I am missing?
>>
>> Thanks a lot!!
>>
>>
>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Orientdb SQL query to check edge properties

2015-07-14 Thread Giulia Brignoli
Hi.

Try this:

to find all sensor that have isDeleted = false:

select expand(inV("DeviceHasSensors")) from (select 
expand(inE("DeviceHasSensors")) from Sensor) where isDeleted= false

for device is the same thing.

Bye,
Giulia

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Update edge property

2015-07-14 Thread ben green
This maybe a simple question (and one was given some years back to delete 
and recreate the edge) but how do you update the property of an edge?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.