I have uploaded a python script that generates python scripts to load data into Protégé. Please see the Community / Share / Essential Tools and Components and filename is ‘Data Load’.
A simple example is included showing how to load from an Excel spreadsheet.
I’ll monitor this thread for bug reports and enhancement requests.
(Export to Visio is to come later this week.)
Announce: Data Load Python Script
First bug: generates incorrect python code when parameter and class names contain - or :.
Hi, Please help, i am trying to generate the class (to import a list of "Application" class... please can you provide the code to generate this, i have looked at the readme file, but still cannot come right.
this is my code: (for location C:\Essential)
1: execfile("C:\Essential\\generateLoadCommand.py")
2: generate("Application")
3: execfile("C:\Essential\\import.txt")
i get this error on step2...
this is my code: (for location C:\Essential)
1: execfile("C:\Essential\\generateLoadCommand.py")
2: generate("Application")
3: execfile("C:\Essential\\import.txt")
i get this error on step2...
Please assist?Warning allows more than one cls for param
Traceback (innermost last):
File "<string>", line 1, in ?
File "C:\Essential\generateLoadCommand.py", line 174, in generate
KeyError: 0
exception from Jython: Traceback (innermost last):
File "<string>", line 1, in ?
File "C:\Essential\generateLoadCommand.py", line 174, in generate
KeyError: 0
: Traceback (innermost last):
File "<string>", line 1, in ?
File "C:\Essential\generateLoadCommand.py", line 174, in generate
KeyError: 0
Hi,
This script was kindly contributed by a member of our user community and is not supported by the Essential Project Team.
I've had a look at the problem and Clint originally coded this for the Essential Meta Model 1 and some of the updates for EMM3 are causing a problem.
However, I think you should be able to progress with this by modifying the 'generateLoadCommands.py' script as follows:
Note that I have added the 'supersedes_version' to the list of slots to ignore. I think that because this is a slot that takes the same type as the class itself (to capture how things are superseded as the architecture evolves) that is causing some problems with the script
Let me know how you get on and I will pursue the beta release of our more powerful Import Utility.
Jonathan
This script was kindly contributed by a member of our user community and is not supported by the Essential Project Team.
I've had a look at the problem and Clint originally coded this for the Essential Meta Model 1 and some of the updates for EMM3 are causing a problem.
However, I think you should be able to progress with this by modifying the 'generateLoadCommands.py' script as follows:
Code: Select all
SLOTS_TO_IGNORE = [
'external_repository_instance_reference',
'name',
'description',
'supersedes_version'
]
Let me know how you get on and I will pursue the beta release of our more powerful Import Utility.
Jonathan