- CSV FILE :该文件存储的为表数据
- CONTROL FILE:该文件是控制文件,即将导入的脚本写在这个文件里,然后还是通过这个 IMPORT 语句执行这个脚本控制文件即可,这样就不需要将导数的语句直接贴在SQL编辑器里运行了
It is recommended to specify this option carefully as it incurs table locks in exclusive mode as well as explicit hard merges and savepoints after data loading is finished. The performance gain from this option can vary according to the table constraints (like primary key) and optimization of other layers (like persistency or DML command).
- Y : year
- MM : month
- MON : name of month
- DD : day
- 'YYYYMMDD' = 20120520
- 'YYYY-MM-DD' = 2012-05-20
- 'YYYY-MON-DD' : 2012-MAY-20
- HH24 : hour
- MI : minute
- SS : second
- 'HH24MISS' : 143025
- 'HH24:MI:SS' : 14:30:25
TIMESTAMP FORMAT <string_for_timestamp_format> ::= <string_literal>
- 'YYYY-MM-DD HH24:MI:SS' : 2012-05-20 14:30:25
When specified, a log file of errors generated is stored in this file. Please ensure the file path you use is writeable by the database.
指定错误日志文件(含路径)

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'system') set ('import_export', 'enable_csv_import_path_filter') = 'false' with reconfigure ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'system') set ('import_export', 'csv_import_path_filter') = '/A;/B' with reconfigure
- Dynamic Tiering
Example 1 - Importing CSV Data
1,"DATA1","2012-05-20","14:30:25",123456 2,"DATA2","2012-05-21","15:30:25",234567 3,"DATA3","2012-05-22","16:30:25",345678 4,"DATA4","2012-05-23","17:30:25",456789

Example 2 - Importing using a control file

Example 3 - Import using date formats
1,"DATA1","05-20-2012","14:30:25",123456 2,"DATA2","05-21-2012","15:30:25",234567 3,"DATA3","05-22-2012","16:30:25",345678 4,"DATA4","05-23-2012","17:30:25",456789
DATE FORMAT 'MM-DD-YYYY';
Example 4 - Import using COLUMN LIST
CREATE TABLE COLLIST ( A INT, B VARCHAR(10), C DATE, D DECIMAL );
You create a CSV text file '/usr/sap/HDB/home/Desktop/data/data_col_list.csv' and add the following contents.现在
data_col_list.csv文件里的内容如下,B列值没有提供,并且CSV里的第一列要存到D列里,第二列要存到C里,第三列要存储到A列里

CREATE COLUMN TABLE FLEX ( X INT ) WITH SCHEMA FLEXIBILITY;--WITH SCHEMA FLEXIBILITY选项只能用于列式存储的表
创建一个可伸缩的表,只有X一列,使用上面的data_col_list.csv文件,文件里有3列,且都没存储到X列里


在自动创建缺失的列时,好像无法指定类型,默认类型全为 nvarchar(5000)?这不太好吧!是否有办法指定呢?