ETL error

1,045 views
Skip to first unread message

Armand Puccetti

unread,
Jul 15, 2019, 7:10:31 PM7/15/19
to OrientDB
Hi,
I am new to OrientDB and exploring how its JSON importation module works in order to build a database of heterogenous documents.
For this, I installed version 3.0.21 and run the OrientDB server and Studio.
I attempted to run the example of importing a JSON file into demoDB , using the documentation instructions:

- I adapted the configuration file as below:
{
  "config": {
    "log": "debug"
  },
  "source" : {
    "file": { "path": "/Users/armand/GIT/markdown-report/examples/orient/database.json" }
  },
  "extractor" : {
    "json": {}
  },
  "transformers" : [
    { "merge": { "joinFieldName": "id", "lookup": "Account.id" } },
    { "vertex": { "class": "Account"} },
    { "edge": {
      "class": "Friend",
      "joinFieldName": "friends",
      "lookup": "Account.id",
      "unresolvedLinkAction": "CREATE"
    } }
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "remote:localhost/demodb",
      "dbUser": "admin",
      "dbPassword": "admin",
      "dbAutoDropIfExists": true,
      "dbAutoCreate": true,
      "standardElementConstraints": false,
      "tx": false,
      "wal": false,
      "batchCommit": 1000,
      "dbType": "graph",
      "classes": [{"name": "Account", "extends":"V"}, {"name": "Friend", "extends":"E"}, {"name": 'Enemy', "extends":"E"}],
      "indexes": [{"class":"Account", "fields":["id:integer"], "type":"UNIQUE_HASH_INDEX" }]
    }
  }
}

and with a JSON source file exactly the same as in the documentation, namely:

[

 {

  "name": "Joe",

  "id": 1,

  "friends": [2,4,5],

  "enemies": [6]

 },

 {

  "name": "Suzie",

  "id": 2,

  "friends": [1,4,6],

  "enemies": [5,2]

 }

]

- then, I ran ETL in a bash console on macOSX:

$ ~/Downloads/orientdb-3.0.21/bin/oetl.sh import.json

OrientDB etl v.3.0.21 - Veloce (build 1d8b0c01ca8fe12a516bba355681e3ec8b218d1d, branch 3.0.x) https://www.orientdb.com


2019-07-15 17:02:27:193 INFO  Default limit of open files (512) will be used. [ONative]Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigurationException: Error on loading config file: import.json

at com.orientechnologies.orient.etl.OETLProcessorConfigurator.parseConfigAndParameters(OETLProcessorConfigurator.java:79)

at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:116)

Caused by: java.io.FileNotFoundException: import.json (No such file or directory)

at java.io.FileInputStream.open0(Native Method)

at java.io.FileInputStream.open(FileInputStream.java:195)

at java.io.FileInputStream.<init>(FileInputStream.java:138)

at com.orientechnologies.common.io.OIOUtils.readFileAsString(OIOUtils.java:145)

at com.orientechnologies.orient.etl.OETLProcessorConfigurator.parseConfigAndParameters(OETLProcessorConfigurator.java:69)

... 1 more


Any idea of what went wrong? Perhaps the loader dbURL field?
Thanks for any help.

Armand

Aaron Laws

unread,
Jul 21, 2019, 6:30:46 PM7/21/19
to orient-...@googlegroups.com
I'm not sure as I haven't done that before, but based on the error, perhaps try an absolute path? If you want to keep using a relative path, you'll need to figure out whence that relative path is resolved (does the script change directories? etc.).

In Christ,
Aaron Laws


--

---
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/orient-database/064eb186-1322-4df8-b342-6d06842bbad3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages