I updated the id to name, which have this attribute in server class
"indexes": [{
> "class": "Server",
> "fields": ["name:string"],
> "type": "NOTUNIQUE"
but have the same error
Started execution with 1 worker threads
> ETL process has problem:
> com.orientechnologies.orient.core.exception.OSchemaException: Cannot create
> property 'name' inside a transaction
> DB name="GratefulDeadConcerts"
> END ETL PROCESSOR
Ivan Mainetti於 2017年1月3日星期二 UTC+8下午5時49分58秒寫道:
>
> does the id property actually exists in Server class?
>
> Il giorno martedì 3 gennaio 2017 10:42:05 UTC+1, Anthony Wong ha scritto:
>>
>> Thanks Ivan.
>>
>> I updated the type to String. It prompts that can't create the property
>> 'id' inside a transaction. Here the id means the wrong name in my server
>> class? or I should create the column of my index?
>>
>> ETL process has problem:
>>> com.orientechnologies.orient.core.exception.OSchemaException: Cannot create
>>> property 'id' inside a transaction
>>
>> DB name="GratefulDeadConcerts"
>>
>> END ETL PROCESSOR
>>
>>
>>
>> Ivan Mainetti於 2017年1月2日星期一 UTC+8下午3時42分15秒寫道:
>>>
>>> this error
>>>
>>> ETL process has problem: java.lang.IllegalArgumentException: No enum
>>> constant com.orientechnologies.orient.core.metadata.schema.OType.NAME
>>> <http://com.orientechnologies.orient.core.metadata.schema.otype.name/>
>>>
>>> means that name isn't a valid type. you should use String
>>>
>>> "indexes": [{
>>> "class": "Server",
>>> "fields": ["id:string"],
>>> "type": "UNIQUE"
>>> }]
>>>
>>> ref: http://orientdb.com/docs/2.2.x/Loader.html#orientdb
>>>
>>>
>>> *PS*
>>> *you firstly declared the index as NOTUNIQUE but in etl you declare it
>>> as UNIQUE, that doesn't feel very correct..*
>>>
>>>
>>>
>>> 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.