So I changed into 'graph' (database type) and tried.

And the error message says "The process cannot access the file because 
another process has locked a portion of the file."

Thus, from the source section on json file, I have changed "lock" to false 
instead true. NOW IT SEEMS RUNNING BUT FAILED TO FULLY OPERATED.

Got a new error that saying, "the class 'Politician' does not extend class 
'V' and therefore cannot be considered a Vertex."

I have created class 'Agent' extends class 'V', then created class 
'Politician' extends class 'Agent'.

How should I change the following (bold) area. Please help me sir...

{
"config": {
"log": "debug"
},
"begin": [
],
"source": {
"file": { "path": "politician_sample.json", "lock": false }
},
"extractor": {
"json": {}
},
"transformers": [
* { "vertex": { "class": "Politician"}}*
],
"loader": {
"orientdb": {
"dbURL": "plocal:../databases/AgentDatabase_Document",
"dbUser": "admin",
"dbPassword": "admin",
            "dbAutoCreate": false,
            "standardElementConstraints":  false,
"tx": false,
"batchCommit": 1000,
            "dbType": "graph",
*            "classes": [{ "name": "Politician", "extends": "Agent" } ],*
            "indexes": [{ "class": "Politician", "fields": ["name:string"], 
"type":"NOTUNIQUE_HASH_INDEX" }]
}
}
}


On Wednesday, March 4, 2015 at 10:45:45 PM UTC-5, Kiheung Park wrote:
>
> I have fixed *ETLPolitician.json* as follow:
>
> {
>> "config": {
>> "log": "debug"
>> },
>> "begin": [
>> ],
>> "source": {
>> "file": { "path": "./ETLPolitician.json", "lock": true }
>> },
>> "extractor": {
>> "json": {}
>> },
>> "transformers": [
>> { "document": { "class": "Politician"}}
>> ],
>> "loader": {
>> "orientdb": {
>> "dbURL": "plocal:../databases/AgentDatabase_Document",
>> "dbUser": "admin",
>> "dbPassword": "admin",
>>             "dbAutoCreate": false,
>>             "standardElementConstraints":  false,
>> "tx": false,
>> "batchCommit": 1000,
>>             "dbType": "document",
>>             "classes": [{ "name": "Politician", "extends": "Agent" } ],
>>             "indexes": [{ "class": "Politician", "fields": 
>> ["name:string"], "type":"NOTUNIQUE_HASH_INDEX" }]
>> }
>> }
>> }
>
>
> And now having another error message,
>
>
> <https://lh5.googleusercontent.com/-DAjNFCSyCwk/VPfQrswPKJI/AAAAAAAABO8/OL7-7aIyzdU/s1600/Error_msg2.PNG>
> Is ETL only support 'graph' type database? Should I go for graph? 
>
> Best, 
>
> Ki
>
>
>
>
> On Wednesday, March 4, 2015 at 7:06:02 PM UTC-5, Kiheung Park wrote:
>>
>> Hi,
>>
>> I want to load JSON formatted data into OrientDB. I have studied all the 
>> tutorial materials and sample codes that are provided by orient 
>> technologies teams. 
>> However, I am having a hard time to figuring what did I do wrong when 
>> importing JSON.
>>
>> I have already designed the document based database called 
>> "AgendDatabase_Document" and here is schema of Politician Class:
>>
>>
>> <https://lh6.googleusercontent.com/-IHyrtq4yJko/VPebYoFoDFI/AAAAAAAABOg/JICwngLFb-M/s1600/Politician_Schema.PNG>
>> And here is my sample json (input file / *source*):
>>
>> [{
>>>     "affiliatedCommittee": [
>>>         "국회운영위원회",
>>>         "안전행정위원회"
>>>     ],
>>>     "age": 0,
>>>     "birthPlace": "",
>>>     "birthday": "6/4/1960",
>>>     "class": "Politician",
>>>     "constituency": "경남 창원시성산구",
>>>     "contact": {
>>>         "address": null,
>>>         "class": "Contact",
>>>         "phoneNumber": null
>>>     },
>>>     "education": {
>>>         "class": "Education",
>>>         "degreeStatus": null,
>>>         "department": null,
>>>         "highschool": "마산공업고등학교",
>>>         "major": null,
>>>         "university": null
>>>     },
>>>     "experience": {
>>>         "class": "Experience",
>>>         "experience": [
>>>             "경남도의회 의원 (7대, 8대), 새누리당 경남도당 수석부대변인"
>>>         ]
>>>     },
>>>     "gender": true,
>>>     "group": [
>>>         "19"
>>>     ],
>>>     "military": "",
>>>     "name": "강기윤",
>>>     "nationality": "대한민국",
>>>     "partyName": "새누리당"
>>> }]
>>
>>
>>
>> And here is my *ETLpolitician.json *on bin directory.
>>
>>> {
>>> "config": {
>>> "log": "debug"
>>> },
>>> "begin": [
>>> ],
>>> "source": {
>>> "file": { "path": "./ETLPolitician.json", "lock": true } //have tried 
>>> ETLPolitician.json, but didn't work as well...
>>> },
>>> "extractor": {
>>> "json": {}
>>> },
>>> "transformers": [
>>> { "document": { "class": "Politician"}}
>>> ],
>>> "loader": {
>>> "orientdb": {
>>> "dbURL: "plocal:../databases/AgentDatabase_Document",
>>> "dbUser": "admin",
>>> "dbPassword": "admin",
>>> "dbAutoCreate": false,
>>> "tx": false,
>>> "batchCommit": 1000,
>>> "dbType": "document"
>>> }
>>> },
>>> } 
>>
>>
>> When I run *oetl.bat ETLPolitician.json *, I got following error 
>> message...
>>
>>
>> <https://lh6.googleusercontent.com/-wzd43DW69NE/VPedczNzhjI/AAAAAAAABOs/t628JRa8DHA/s1600/Error_msg.PNG>
>>  
>> Can anyone help me on importing JSON? DEFINITELY NEED MORE 
>> DOCUMENTATIONS!!! :(
>>
>> Sincerely, 
>>
>> Ki
>>
>>

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to