|
IMPORT
This function imports delimited ASCII files into Mysql tables. INSERT and SELECT privileges are required in order to import a file.
Currently there are two main import formats supported by this program:
- Simple format (CSV)
- Advanced format (Mysql compatible)
Both formats have the following options:
- Ignore input on duplicate Unique Key Values - input rows that duplicate an existing row on a unique key value are skipped; error message will not be generated.
- Replace existing row on duplicate Unique Key Values - new rows replace existing rows that have the same unique key value
- Get error on duplicate Unique Key Values - an error message is generated on duplicate unique key and the operation is aborted.
- Number of lines to be ignored - number of lines starting from the beginning of the file to be ignored.
IMPORTANT:
- You must know exactly which format was used to create this file,
- The number of fields and field types of the table must be corresponding to the number of values in a line and value types of the file to be imported, otherwise the file most likely will not be imported.
To import a file, select a table and hit IMPORT button.
Then select file format, select a file to be imported, select import options and click IMPORT. A message will be displayed saying whether or not the file was imported successfully.
CSV FORMAT
In CSV format, comma or semicolon delimited plain text files will be imported into Mysql table. There are two import options to select from: - Comma-separated values - Semicolon-separated values
ADVANCED FORMAT
The Advanced format emulates MySQL query LOAD DATA INFILE using the same import options. See MySQL online manual for details: http://www.mysql.com/doc/en/LOAD_DATA.html
Field options:
- Fields terminated by: This is the column value separation character in the data file. Default value is TAB.
- Fields enclosed by: The column values are enclosed within this character. If "Optionally" is checked only nonnumeric columns are enclosed. By default no values are enclosed.
- Fields escaped by: This is the escape character for special characters. The default value is Backslash `\'.
Line options:
- Lines terminated by: This value terminates each row in the data file to be imported. This value may be more than one character. The default value of Lines terminated by is newline character(s).
|