Neo4j to OrientDB cannot create vertices - orientdb-2.1

I am trying to import data out of Neo4J (neo4-shell) and loading into OrientDB (gremlin.sh). However OrientDB is not able to create Vertices and appear to be failing for following reasons.
gremlin> g.loadGraphML('/tmp/out.graphml');
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'ACTED_IN' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'DIRECTED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'PRODUCED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'WROTE' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'FOLLOWS' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'REVIEWED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
==>null
gremlin> exit
And data looks like this
<node id="n0" labels=":Movie"><data key="labels">:Movie</data><data key="title">The Matrix</data><data key="released">1999</data><data key="tagline">Welcome to the Real World</data></node>
<node id="n1" labels=":Person"><data key="labels">:Person</data><data key="name">Keanu Reeves</data><data key="born">1964</data></node>
<node id="n2" labels=":Person"><data key="labels">:Person</data><data key="name">Carrie-Anne Moss</data><data key="born">1967</data></node>
<node id="n3" labels=":Person"><data key="labels">:Person</data><data key="name">Laurence Fishburne</data><data key="born">1961</data></node>
<node id="n4" labels=":Person"><data key="labels">:Person</data><data key="name">Hugo Weaving</data><data key="born">1960</data></node>
<node id="n5" labels=":Person"><data key="labels">:Person</data><data key="name">Andy Wachowski</data><data key="born">1967</data></node>
<node id="n6" labels=":Person"><data key="labels">:Person</data><data key="name">Lana Wachowski</data><data key="born">1965</data></node>
<node id="n7" labels=":Person"><data key="labels">:Person</data><data key="name">Joel Silver</data><data key="born">1952</data></node>
<node id="n8" labels=":Person"><data key="labels">:Person</data><data key="name">Emil Eifrem</data><data key="born">1978</data></node>
<node id="n9" labels=":Movie"><data key="labels">:Movie</data><data key="title">The Matrix Reloaded</data><data key="released">2003</data><data key="tagline">Free your mind</data></node>

Which OrientDB version are you using?
OrientDB has a schema, so it's trying to auto-create vertice and edge classes. You could use a Non Transactional graph with: g = new com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx();

Thank you Luca for quick reply. It still did not help. It appears the load from neo to orient using gremlin does not create vertices. However when I created DB and imported same data from same GraphML file it just takes it without errors and all data was imported. Then I compared both neo and orient Graph UI gets near similar view, however neo shows properties for all objects (nodes, relationships..) but orient does not show them any property explicitly. Does orient maintains properties implicitly?

Related

How to use map datatype in clickhouse? How to turn on experimental features?

I am trying to create a table with map datatype in clickhouse but it is giving this error.
query: CREATE TABLE table_map (a Map(String, UInt64)) ENGINE=Memory;
Received exception from server (version 21.3.4):
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Cannot create table with column 'a' which type is 'Map(String,UInt64)' because experimental Map type is not allowed. Set 'allow_experimental_map_type = 1' setting to enable.
How do I turn this feature on ? I am not able to figure it out.
you can enable it in default profile
cat /etc/clickhouse/users.d/allow_experimental_map_type.xml
<?xml version="1.0"?>
<yandex>
<profiles>
<default>
<allow_experimental_map_type>1</allow_experimental_map_type>
</default>
</profiles>
</yandex>

Is there a way to patch to an entity using wildcards or list of servicepaths

Im trying to update an entity using the PATCH /v2/entities/id/attrs endpoint. The service of the id is known; however, the servicepath is not.
My first attempt was to leave the header empty or rather not send it at all. For a GET query, this does the job right, however for a PATCH, this returns me a 200. First question, is this the expected behavior?
Second try was to use a wildcard. I know that my entity is at SP /automatization/<something>. I tried PATCHing to /automatization/# and got a 204, but the entity did not change.
My last try was to use a list of known SPs: I know the entity I want is in one of a number of SPs, so a used a comma separated list as the SP header. Same as above: 204 but no change.
Am I missing something?
Orion version:
{
"orion": {
"version": "2.3.0-next",
"uptime": "2 d, 1 h, 50 m, 52 s",
"git_hash": "c99fef1b5c93bf1673d407968c2c101f01b95980",
"compile_time": "Tue Mar 10 09:46:52 UTC 2020",
"compiled_by": "root",
"compiled_in": "0a42bdf43030",
"release_date": "Tue Mar 10 09:46:52 UTC 2020",
"doc": "https://fiware-orion.rtfd.io/"
}
}
It's unfortunate that the service path isn't returned in the payload data of the queries. That would have solved your problem. If I were you (and if you have access to the DB) I'd use the mongo shell to find the service path of your entity.
About getting a 204, that seems like a bug. The entity you want to patch isn't found (as you put in the wrong service path) and a 404 should be returned.
Lists and wildcards as service paths are only for queries, never for creation/updates. The broker should complain there too, with a 400 and 'Invalid Service-path', if you ask me ...
Seems like we have two issues here, apart from the one to include service path in the response ...

Error when fetching data from spreadsheet

After eagerly waiting for appmaker its finally here! I immediately started diving into it and i love it.
I want to make a basic app to track the status of our chromebooks from a spreadsheet, which i think appmaker is quite a good option for.
Well, i followed the database connection screen and got everything hooked up, but when i try to load it in via a widget is gives me a error when i run the app
I get the following error:
E
Fri Jun 15 12:40:08 GMT+200 2018
The function queryRecords returned undefined, please make sure a value was explicitly returned. Error: The function queryRecords returned undefined, please make sure a value was explicitly returned.
E
Fri Jun 15 12:40:08 GMT+200 2018
Executing query for datasource InventorySheet: (Error) : The function queryRecords returned undefined, please make sure a value was explicitly returned.
E
Fri Jun 15 12:40:08 GMT+200 2018
Executing query for datasource InventorySheet failed.
How do we fix this?
Greetings,
Luuk

How to get Oracle node in release 1.0

Up to Milestone 14, I was used to get the Oracle node using:
val nodes = serviceHub.networkMapCache.getNodesWithService(*ServiceType*)
Now in release 1.0, according to the oracle-example, the Oracle Node lookup has to be made by legal name, is that right?
That's correct. You'd use something like:
networkMapCache.getNodeByLegalName(oracleName)?.legalIdentities?.first() ?: throw IllegalArgumentException("Requested oracle $oracleName not found on network.")
We will be re-introducing service identities in some form in the future.

Encounter warning when add edge in OrientDB

Here is my Code:
OrientVertex luca = graph.addVertex(null);
luca.setProperty("name", "John" + Integer.toString(i));
OrientVertex marko = graph.addVertex(null);
marko.setProperty("name", "Van Ness Ave." + Integer.toString(i + 1));
OrientEdge lucaKnowsMarko = graph.addEdge(null, luca, marko, "knows");
graph.commit();
Here is a snapshot of the same.
And then, I encountered this warning:
WARNING: The command 'create edge type 'knows' as subclass of 'E''
must be executed outside an active transaction: the transaction will
be committed and reopen right after it. To avoid this behavior execute
it outside a transaction (db=test)
Googling this problem, it seems that this question is relevant to the not-transactional and transactional databases operations.
You are working schema less, so OrientDB creates classes for you the first time you create vertexes/edges. In this case it was for the Edge class 'knows'. You can avoid this by creating classes at the beginning, or however, outside the scope of transaction. Try to execute this before your code, only once:
OrientGraphNoTx graph = new OrientGraphNoTx(url);
graph.createEdgeType("knows");
graph.shutdown();

Resources