Instructions for MatrixOne Load Data Support¶
The complete syntax of MySQL 8.0 is as follows:
LOAD DATA
[LOW_PRIORITY | CONCURRENT] [LOCAL]
INFILE 'file_name'
[REPLACE | IGNORE]
INTO TABLE tbl_name
[PARTITION (partition_name [, partition_name] ...)]
[CHARACTER SET charset_name]
[{FIELDS | COLUMNS}
[TERMINATED BY 'string']
[[OPTIONALLY] ENCLOSED BY 'char']
[ESCAPED BY 'char']
]
[LINES
[STARTING BY 'string']
[TERMINATED BY 'string']
]
[IGNORE number {LINES | ROWS}]
[(col_name_or_user_var_var
[, col_name_or_user_var] ...)]
[SET col_name={expr | DEFAULT}
[, col_name={expr | DEFAULT}] ...]
Fields not supported by MatrixOne¶
In the above complete syntax structure, MatrixOne does not yet support the following fields:
REPLACE
PARTITION
CHARACTER SET: Currently only UTF8 is supported
FIELDS TERMINATED BY ‘string’: simdcsv does not accept \r,\n,Unicode replacement character (0xFFFD).
FIELDS [OPTIONALLY] ENCLOSED BY ‘char’: simdCSV fixed is
".FIELDS ESCAPED BY ‘char’: simdcsv is not supported yet.
LINES STARTING BY ‘string’: simdcsv is not supported. Lines with the first character are filtered out.
LINES TERMINATED BY ‘string’: simdcsv does not support modification. Fixed ‘\n’,
\r\n.user_var: Not supported. The data columns corresponding to the variable are filtered out.
SET col_name={expr | DEFAULT}: Not supported.
LOW_PRIORITY: Not supported
CONCURRENT: Not supported
LOCAL: Not supported. local requires data to be transferred from the client side to the server side.
MatrixOne supports syntax and formats¶
grammar¶
Grammar |
Description |
|---|---|
use T; |
|
load data |
|
infile ‘pathto/file’ |
|
ignore |
Optional. |
INTO TABLE tableA |
|
FIELDS TERMINATED BY ‘,’ |
Must represent the field splitter. Usually ‘,’. And ssb’s is ‘ |
IGNORE number LINES |
Optional, indicating that the number line at the beginning of the file is ignored |
(col0,col1,…,coln); |
Optional, represents the list of column names in the table. For example, |
csv format requirements¶
character |
Description |
|---|---|
Field splitter |
is usually ‘,’, or other characters (not |
Field contains symbol |
|
Line End Character |
|
Field NULL Value |
For value \N , it means that the field is NULL, and any other case is considered a string input |
Comment symbols |
‘#’ lines as the first character will be filtered out |