Hello!  I am trying to import DBPedia Person, per the documentation 
<http://orientdb.com/docs/last/orientdb-etl.wiki/Import-from-DBPedia.html>, 
but am running into errors.  Please see the below and let me know if you 
have any ideas.

Thank you!

*OrientDB release? *2.0.3

*What steps will reproduce the problem?*
1. Copied JSON from this 
page: http://orientdb.com/docs/last/orientdb-etl.wiki/Import-from-DBPedia.html 
, and pasted into a new ASCII plain text document
2. made changes to match my case (whole file here with changes in 
*bold/blue*):
{
  "config": {
    "log": "debug",
    "fileDirectory": "*F:/IS_DSA/DBpedia/2014/*",
    "fileName": "Person.csv.gz"
  },
  "begin": [
   { "let": { "name": "$filePath",  "value": "$fileDirectory.append( 
$fileName )"} },
   { "let": { "name": "$className", "value": "$fileName.substring( 0, 
$fileName.indexOf('.') )"} }
  ],
  "source" : {
    "file": { "path": "$filePath", "lock" : true }
  },
  "extractor" : {
    "row": {}
  },
  "transformers" : [
   { "csv": { "separator": ",", "nullValue": "NULL", "skipFrom": 1, 
"skipTo": 3 } },
   { "merge": { "joinFieldName":"URI", "lookup":"V.URI" } },
   { "vertex": { "class": "$className"} }
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "*remote:localhost/database/dbpedia*",
      "dbUser": "*tester*",
      "dbPassword": "*tester*",
      "dbAutoCreate": true,
      "tx": false,
      "batchCommit": 1000,
      "dbType": "graph",
      "indexes": [{"class":"V", "fields":["URI:string"], "type":"UNIQUE" }]
    }
  }
}
3. saved as ASCII encoded JSON file "import_dbpedia.json"
4. (in Windows) started Server.bat
5. opened cmd, cd to bin directory, then ran "oetl.bat 
../import_dbpedia.json"
6. received this error message:  (what I think is strange is the part in 
*bold/red*.  The JSON contains $fileName, not $fileNam.  I tried changing 
this to other values of different lengths - every time it cuts off the last 
character of the variable.
F:\IS_DSA\Graph DBs\orientdb-community-2.0.3\bin>oetl.bat 
..\import_dbpedia.json
OrientDB etl v.2.0.3 (build @BUILD@) www.orientechnologies.com
Exception in thread "main" 
com.orientechnologies.orient.core.exception.OConfigurationException: Error 
on creating ETL processor
        at 
com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:278)
        at 
com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:188)
        at 
com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:163)
Caused by: java.lang.NumberFormatException: For input string: "*$fileNam*"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at 
com.orientechnologies.orient.core.record.impl.ODocumentHelper.evaluateFunction(ODocumentHelper.java:742)
        at 
com.orientechnologies.orient.core.record.impl.ODocumentHelper.getFieldValue(ODocumentHelper.java:481)
        at 
com.orientechnologies.orient.core.command.OBasicCommandContext.getVariable(OBasicCommandContext.java:121)
        at 
com.orientechnologies.orient.core.command.OBasicCommandContext.getVariable(OBasicCommandContext.java:57)
        at 
com.orientechnologies.orient.etl.OAbstractETLComponent.resolve(OAbstractETLComponent.java:130)
        at 
com.orientechnologies.orient.etl.block.OLetBlock.executeBlock(OLetBlock.java:59)
        at 
com.orientechnologies.orient.etl.block.OAbstractBlock.execute(OAbstractBlock.java:31)
        at 
com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:231)
        ... 2 more

*If you're using custom settings please provide them below (to dump all 
the settings run the application using the JVM 
argument -Denvironment.dumpCfgAtStartup=true):*
Not using custom settings.

*What is the expected output? What do you see instead?*
I expected the ETL program to import the DB-Pedia Person data into my 
"dbpedia" database.
Instead I received an error message mentioning a truncated variable name - 
$fileNam instead of $fileName:
Exception in thread "main" 
com.orientechnologies.orient.core.exception.OConfigurationException: Error 
on creating ETL processor
...
java.lang.NumberFormatException: For input string: "$fileNam"


Thank you!

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to