Prepare Data For Mysql

THL Toolbox > Images & Immersive Technologies > Technically Processing Images > Image Processing - Legacy Procedures > Image Processing Steps for Image Database > Prepare Data For Mysql

Image Processing Steps for Image Database: Prepare Data For Mysql

Contributor(s): David Newman and Dan Haig

1. Put tab-delimited text into Excel.

First, open Excel and file->open the .tab file from the Export Data from Filemaker step (important! don't open it by clicking the .tab file!); choose file type: delimited, click next; say Delimiter is a Tab, click next; Column data format s/b text - check specially for Directory Field and Filenames to catch initial Zero! Say it's text; click finish. Save this excel file as revised-x-records.txt.

2. Create and order columns.

Insert blank top row for names of columns, then open up the previously exported html table, grab the column names, paste into top of revised.txt. If there aren't tons of column headers you can do this quicker by hand perhaps.

If need be, reorder the Excel columns so that they are in the same order as the MySQL fields - this now means ALPHABETICAL ORDER. You don't need all the same fields as the MySQL table. So for instance if the first 7 fields in the MySQL are as follows:

CreationYear
 FileName
 OtherID1
 OtherID2
 Photographer
 Project
 TempWorkflow

…and you have only 3 of those fields to import, then just make sure they are in matching order:

CreationYear
 FileName
 Photographer

3. Save as UTF-8!

Save the Excel file as a tab-delimited .txt file. The main database is not UTF8 at this point, but it will be in the future. At that time you'll need to save from Excel as Unicode (which is really UTF16) and then open that file in jEdit or the like and save it as proper UTF8 (Utilities->Buffer Options->UTF-8).

Next: Prepare Mysql for Data ->

Provided for unrestricted use by the external link: Tibetan and Himalayan Library