Question about exporting edges into csv files

66 views
Skip to first unread message

jorge castrejon

unread,
Feb 27, 2014, 5:45:38 AM2/27/14
to spar...@googlegroups.com
Hello,

I'd like more information on how to create an instance of EdgeTypeExporter,
I've read the official documentation and I have some doubts about the parameters of the EdgeTypeExporter's constructor:

EdgeTypeExporter(RowWriter rw, Graph g, int t, AttributeList attrs, int hPos, int tPos, int hAttr, int tAttr)

Reading the manual, i understand the parameters (hPos, tPos) were the positions inside the row where node's information will be,
but the next two, i believe those arguments were the heads and tails attributes IDs which value will be in the positions previously added.

(i.e)

int edgeType=graph.findType...  // type of the edge
int headType=...                // type of the head node
int tailType=...                //type of the tail node
int edgeAttr=graph.findAttribute...  //attribute of the egde 
AttributeList attributelist = new AttributeList(); 
attributelist.add(edgeAttr); 

int headAttr=graph.findAttribute...  //attribute ID that i want make csv files
int tailAttr=...

EdgeTypeExporter ete= new EdgeTypeExporter(csv, graph,egdeType, attributelist, 1,3,headAttr,tailAttr);

i ran this, but the result in the csv file are just the edgeAttr's value. I expected the head and tail value too, 

I dont know if I'm using the wrong arguments or I simply don't undertand how to call the method

Thank for your time.

c3po.ac

unread,
Mar 3, 2014, 6:56:20 AM3/3/14
to spar...@googlegroups.com
Hi,

You are using it right. The problem is a bug in the exporter with some head and tail positions.
It will be fixed in the next version. Sorry for the inconvenience.

Meanwhile, you could use the positions "0,1" for the head and tail identifiers. That should always work.

Best regards.


El dijous 27 de febrer de 2014 11:45:38 UTC+1, jorge castrejon va escriure:

jorge castrejon

unread,
Mar 4, 2014, 5:41:38 AM3/4/14
to spar...@googlegroups.com
Hi.

I just ran my test modifying the position 1,3 in the example by 0,1 the way you told me

( EdgeTypeExporter ete= new EdgeTypeExporter(csv, graph,type, attrs, 0,1,attr2,attr3) )

and I've got this:

Exception in thread "main" java.lang.RuntimeException: C++ dex::gdb::Error exception thrown
at com.sparsity.dexjavawrapJNI.dex_io_EdgeTypeExporter_run(Native Method)
at com.sparsity.dex.io.EdgeTypeExporter.run(EdgeTypeExporter.java:47)

Thanks for your time

c3po.ac

unread,
Mar 4, 2014, 7:03:32 AM3/4/14
to spar...@googlegroups.com

Hi,

Then it must be a different problem.

The log file (the text file, not the ".dex.log") could show more details.
Can you check it or send the file to dam...@sparisty-technologies.com ?

Could you also send her more details about the definition of all the types and attributes involved in the export operation?

Thanks!

El dimarts 4 de març de 2014 11:41:38 UTC+1, jorge castrejon va escriure:

jorge castrejon

unread,
Mar 5, 2014, 5:50:34 AM3/5/14
to spar...@googlegroups.com
True, I didn't see the log 
 
The log::
2014-03-04 13:31:14.183|DEX[INFO] ** START ** 2014-03-04 13:31:14.183 Software version: 4.8.2
2014-03-04 13:31:14.183|DEX[INFO] Decoded license: Software version [4] Objects limit [1000000000] Sessions limit [unlimited] Identifier [1085] Expiration date [5/2014] High-Availability [on]
2014-03-04 13:31:14.183|DEX[INFO] Scheduler started with 1 active threads.
2014-03-04 13:31:14.802|DEX[INFO] GraphPool 'dexx' has been opened at /local/jcastrejon/dex/db.dex
2014-03-04 13:31:14.812|Graph[SEVERE] Can not get the attribute because the object (281600) type is not the type of the given attribute.

this object corresponds with other node type, so I think that it is trying to export all the edges and when it tries to get the first node's atribute,
 which doesn't correspond with the indicated type.
 
About the types, 
I have around 100 different types, and each node has between 3 and 10 properties each.
The edges have only one type and one property each.

Thanks for your time.

c3po.ac

unread,
Mar 5, 2014, 9:35:09 AM3/5/14
to spar...@googlegroups.com

Hi,

Yes, the current version of the exporter can't export edges when the head/tails don't have the required attributes.
We will send you a pre-release of the 5.0.1 version that just ignores those edges.

Could you please send your platform requirements (OS, 32/64bits, maven?)  to Damaris?

Best regards.


El dimecres 5 de març de 2014 11:50:34 UTC+1, jorge castrejon va escriure:
Reply all
Reply to author
Forward
0 new messages