Batch Data Import Process.... What am I doing wrong??

Post Reply
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

Hoping you are able to help with the data load process. I'm stuck.

I want to be able to load data into the tool in an automated fashion as with the organisation component alone it's 80 instances of a class.

Attempt 1:
I have viewed the contributions tab and have downloaded Data+Load+v2.zip and I'm having trouble with the generateLoadCommand.py component:

As an example:

:>>> generate("<Application>")
exception from Jython: Traceback (innermost last):
File "<string>", line 1, in ?
File "/Users/paulmcmahon/Downloads/Data Load v2/generateLoadCommand.py", line 174, in generate
KeyError: 0
: >>> generate("<Application>")
exception from Jython: Traceback (innermost last):
File "<string>", line 1, in ?
File "/Users/paulmcmahon/Downloads/Data Load v2/generateLoadCommand.py", line 133, in generate
AttributeError: 'NoneType' object has no attribute 'getTemplateSlots'

Attempt 2:
I have used the Essential Integration tab, but get stuck at the .xml load component – how do I know what format this is supposed to be in? How do I know what it will be for classes which I create?

Is there a way I can export to the required import format the current base so I can at least mimic the input strings?

Appreciate your support

Paul
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Paul,

I think there are two things at work here.

First, when you specify the name of the class for which you want to generate the import functions, do not include the '<' in the class name. So, the function call would be:

Code: Select all

generate("Application_Provider")
to set things up to load your systems into the repository.

You will also need to make a tweak to the generateLoadCommand.py script as I described in this posting describing the same problem.

Although we (the Essential Project Team) don't support this contributed package, let me know if you are still having trouble.

Jonathan
Essential Project Team
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

Jonathon,

Thanks - this seems to get me to a stage further, but now after the generate("Application") there is no verbose output within the script console. I take it this is related to the configuration within Protege ? I'm on 3.4.8
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

Jonathon,

Thanks - this seems to get me to a stage further in the proces but now there is no verbose output on generate("Application") I take it this has something to do with Protege ? 3.4.8 is my version. Any pointers here?

In that post you make mention of a beta more powerful data load script - Has this progressed any further?

Paul
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

Hi,

Adding back into this - I found out how to resolve this. I'm running Protege 3.4.8. I had to replace the jython.jar

To do this:


cd <installdir>/plugins/edu.stanford.smi.protege.script/
mv jython.jar jython.old.bak
wget http://smi-protege.stanford.edu/repos/p ... jython.jar

Ta
Paul
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for this update, Paul.

I was working with Protege 3.4.8 and the OOTB jython.jar when I looked at this yesterday but may not have gone as far as you got.

On the import tool, we have a powerful web-based import application that makes the process of importing data from spreadsheets very much simpler. We've been road-testing this for some time and hope to get it out as a beta very soon. Sarah's blog on our roadmap has some more details that may be of interest.

Jonathan
Essential Project Team
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

Thanks. I suspect without this import tool and or any relevant data is going make it a struggle...!
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

I've come across another bug this unsupported script.

Essentially anything with a list gives Error: call of non-function ('list' object)

on:
generate("Business_Capability")

I've tried my best to resolve this one but i'm stuck...

I'll patiently await the beta of the data load script :ugeek:
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Without wanting to torture you further ;) , we're in the process of packaging up the the import utility for a beta release at the moment...

Jonathan
Essential Project Team
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

jonathan.carter wrote:Without wanting to torture you further ;) , we're in the process of packaging up the the import utility for a beta release at the moment...

Jonathan

Great - when do we see it? :cry:
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

still packing? need more tape? :)
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks Paul!

:D

We're working on this (documentation, examples...)

Jonathan
Essential Project Team
paulmcmahon
Posts: 16
Joined: 01 Aug 2012, 05:19

Any confirmed ETA on this release? There doesnt seem to be much activity around here :/
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Apologies, we ran into some more things that we felt needed to be resolved before we released it. A beta version should available very shortly.

Jonathan
Essential Project Team
Post Reply