-
Notifications
You must be signed in to change notification settings - Fork 10
Cookbook: Commenting out records in CSV input files
While testing CSV toolchains, it is sometimes useful to skip problematic rcords in CSV input files. To comment out a record, place a pound sign (#
) at the beginning of the field identfied as the record_key
in your .ini file. Here is an example using a CSV record where the field containing "postcard_100" in its record_key
column:
#postcard_100,"Waterfront and Shipping Vancouver, B.C.","1907","Vancouver, BC","Waterfronts; Vessels; Shipping","A waterfront and shipping scene in Vancouver, B.C. Several vessels are shown along the waterfront.","postcard_20.jpg"
Note that in this example, the #
is not at the beginning of the row, it's at the beginning of the first field in the record. If the record_key
field was in the second column, this would be the correct way to comment out that record:
"Waterfront and Shipping Vancouver, B.C.",#postcard_100,"1907","Vancouver, BC","Waterfronts; Vessels; Shipping","A waterfront and shipping scene in Vancouver, B.C. Several vessels are shown along the waterfront.","postcard_20.jpg"
Even though MIK allows you to define any column as the record_key
, it's best practice to have that column in the first column in the CSV file, if only to improve readability and to reduce confusion over where to put the commenting-out #
.
Content on the Move to Islandora Kit wiki is licensed under a Creative Commons Attribution 4.0 International License.