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"
--
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.