Thanks Ivan, I created the index in the class server
CREATE INDEX server_name ON Server (name) NOTUNIQUE METADATA
{ignoreNullValues: true}
Ivan Mainetti於 2016年12月29日星期四 UTC+8下午7時56分38秒寫道:
>
> how did you defined the index on Server class?
>
> Il giorno giovedì 29 dicembre 2016 11:22:10 UTC+1, Anthony Wong ha scritto:
>>
>> I would like to upload the data in OrientDB, but have errors. Here is the
>> json file: Try to upload the data in csv file and make the linkage with
>> server and virtualmachine
>>
>> {
>> "source": {
>> "file": {
>> "path": "/root/Orientdb/bin/temp/datasets/server.csv"
>> }
>> },
>> "extractor": {
>> "row": {}
>> },
>> "transformers": [{
>> "csv": {
>> "separator": ",",
>> "columnsOnFirstLine": false,
>> "columns": ["name", "description", "servercategory",
>> "primarysupport", "secondarysupport", "powersource", "serialnumber",
>> "brand", "model", "serverlocation", "osfamily", "osversion", "cpuspeed",
>> "ram", "numberofprocessor", "cpucorecount", "leftpowersource",
>> "rightpowersource"]
>> }
>> }, {
>> "vertex": {
>> "class": "Server"
>> }
>> }, {
>> "merge": {
>> "joinFieldName": "virtualhost",
>> "lookup": "Server.name"
>> }
>> }, {
>> "edge": {
>> "class": "VirtualMachine",
>> "joinFieldName": "to",
>> "lookup": "Server.name",
>> "unresolvedLinkAction": "CREATE"
>> }
>> }],
>> "loader": {
>> "orientdb": {
>> "dbURL": "plocal:/databases/GratefulDeadConcerts",
>> "dbType": "graph",
>> "wal": false,
>> "batchCommit": 1000,
>> "tx": true,
>> "txUseLog": false,
>> "useLightweightEdges": true,
>> "classes": [{
>> "name": "Server",
>> "extends": "V"
>> }, {
>> "name": "VirtualMachine",
>> "extends": "E"
>> }],
>> "indexes": [{
>> "class": "Server",
>> "fields": ["id:name"],
>> "type": "UNIQUE"
>> }]
>> }
>> }
>> }
>>
>> However, there are errors after run the command (./oetl.sh server.json) .
>> What should I do to fix the issue? Or i should not create the class (Server
>> and VirtualMachine) before run the script? Thanks.
>>
>> The error message is
>>
>> BEGIN ETL PROCESSOR
>> [file] INFO Reading from file /root/Orientdb/bin/temp/datasets/server.csv
>> with encoding UTF-8
>> Started execution with 1 worker threads
>> ETL process has problem: java.lang.IllegalArgumentException: No enum
>> constant com.orientechnologies.orient.core.metadata.schema.OType.NAME
>> END ETL PROCESSOR
>> + extracted 0 rows (0 rows/sec) - 0 rows -> loaded 0 vertices (0
>> vertices/sec) Total time: 5ms [0 warnings, 0 errors]
>>
>>
--
---
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.