Testing import function with SU db

43 views
Skip to first unread message

Francesco de Virgilio

unread,
Apr 14, 2012, 12:14:55 PM4/14/12
to ark-users
Hi,
after testing the manual data recording from paper in ARK (it works just fine!), I'm getting into
the "import" issue. I've compiled few simple csv from mdb data, imported them as ARK.import_test table
using PHPMyAdmin, and now I'm trying to define the CMAP structure.

Obviously, CMAP structure compiling assumes a little knowledge of what's going to happen
under the hood in ARK db, and to me it seems quite complex. I've read the import guide [0],
nonetheless I'm not able to operate an import.

I'm using ARK 1.0 with the SU [1] database. My simple ARK.import_test is structured as follows:

COL_N COL_CONTENT SAMPLE_DATA
COL 1 UID 1, 2, 3, 4
COL 2 catalog_number 435
COL 3 site_name Siponto
COL 4 excavation_year 2002
COL 5 area_number 4
COL 6 context_number 35
COL 7 context_description fossa comune

I've dropped lots of data from a common archaeological DB to make the import stupid simple.

When mapping the db, I got the following error:

## CODE ##
Add structure mapping err:
SQL: INSERT INTO cor_tbl_cmap_structure ( `cmap`, `tbl`, `col`, `class`, `uid_col`, `itemkey`, `raw_itemval_tbl`, `raw_itemval_col`, `raw_itemval_join_col`, `tbl_itemval_join_col`, `type`, `lang`, `true`, `false`, `notset`, `lut_tbl`, `lut_idcol`, `lut_valcol`, `end_source_col`, `xmi_itemkey`, `xmi_itemval_col`, `raw_stecd_tbl`, `raw_stecd_col`, `raw_stecd_join_col`, `tbl_stecd_join_col`, `ark_mod`, `log`) VALUES ( 1, 'import_primotest', 'COL 2', 'num', 'COL 1', 'cxt_cd', 'FALSE', 'COL 2', 'FALSE', 'FALSE', '5', '', '', '', '', '', '', '', '', '', '', 'FALSE', 'FALSE', '', '', '', 'YES')
Error: Unknown column 'raw_stecd_tbl' in 'field list'
## CODE ##

The structure of cor_tbl_cmap_structure:

id
cmap
tbl
col
class
uid_col
itemkey
raw_itemval_tbl
raw_itemval_col
raw_itemval_join_col
tbl_itemval_join_col
type
lang
true
false
notset
lut_tbl
lut_idcol
lut_valcol
end_source_col
xmi_itemkey
xmi_itemval_col
ark_mod
log

So, it seems that the script is trying to insert 27 records in 24 columns: 4 columns are missing, probably:

raw_stecd_tbl
raw_stecd_col
raw_stecd_join_col
tbl_stecd_join_col

I've tried to add the above mentioned columns to cor_tbl_cmap_structure, and mapped the COL2.
The error doesn't appear anymore, the field in Structure Map is shown highlighted, cor_tbl_cmap_structure
now contains a new record (it was empty), and I try to run a test extraction, but it gives me
a not-well-documented error, as follows:

Func: test script
SQL: SELECT COL 1 FROM import_primotest
Error:

The error is too vague and I don't know how to move forward.

Thank you and apologies for the long mail ;)

[0] http://ark.lparchaeology.com/wiki/index.php/Importing_Data#Structure_Map_-_CMAP_Structure
[1] http://ark.lparchaeology.com/download/demos

--
Francesco de Virgilio
*Ubuntu-it team member*
mailto:fra...@ubuntu-it.org
http://wiki.ubuntu-it.org/FrancescoDeVirgilio
*Wikimedia projects contributor*
http://en.wikipedia.org/wiki/User:Fradeve11
*OpenStreetMap Mapper*
http://www.openstreetmap.org/user/Fradeve11
*Blog*
http://www.fradeve.org
"Love - Peace - Freedom - Free Software"

signature.asc

Jessica Ogden

unread,
Apr 16, 2012, 1:05:28 PM4/16/12
to arku...@googlegroups.com
Hi Francesco -

Just a post to let you know Guy is looking into it and will respond in due course. He's our 'import guru' :-)

Best,
Jess

Guy Hunt

unread,
Apr 16, 2012, 1:13:22 PM4/16/12
to arku...@googlegroups.com
Hi Francesco,

It's great to hear that you've got ARK set up and working for new data.

The import tools for ARK are probably one of the most complex parts of ARK to master! The current status of the tools is that they are not 100% ready for prime time use. The tools do work, but as you say, they assume some prior understanding of the way that ARK stores data, and even then they can be tricky to use.

If you contact me directly off list, I would be happy to help you out with this and perhaps we could put together some better documentation for the process?

Cheers,

Guy

guy....@lparchaeology.com


--
You received this message because you are subscribed to the Google Groups "arkusers" group.
To post to this group, send email to arku...@googlegroups.com.
To unsubscribe from this group, send email to arkusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/arkusers?hl=en.



--
Guy Hunt

L - P : Archaeology
www.lparchaeology.com

L - P : Archaeology is the trading name of L - P : Heritage LLP  Registered in England and Wales OC366545
Registered office address: Amelia House, Crescent Road, Worthing, BN11 1QR

Reply all
Reply to author
Forward
0 new messages