Fast load for Teradata
Below is a sample script that I've used to import data into a Teradata DWH using the Fast Load tool. Teradata is a real hassle in not having any bulk import functionality like Oracle. Took me hours to understand what is going on and getting the script to work.
In any case, sharing it here for others to refer to.
In any case, sharing it here for others to refer to.
//test.csv
node,cluster_id,node_type
XXXX12710,1,msisdn
XXXX643124,2,msisdn
//
SESSIONS 5;
LOGON/ , ;
CREATE TABLE, NO FALLBACK
(
NODE VARCHAR(50) ,
CLUSTER_ID VARCHAR(10),
NODE_TYPE VARCHAR(10)
)
PRIMARY INDEX(NODE);
begin loading+ tablename>
errorfiles+ tablename>_err1, + tablename>_err2;
set record vartext ",";
record 2;
DEFINE NODE (VARCHAR(50)),
CLUSTER_ID (VARCHAR(10)),
NODE_TYPE (VARCHAR(10))
FILE=D:\test.csv;
insert into+ tablename> values
(
:NODE,
:CLUSTER_ID,
:NODE_TYPE
);
END LOADING;
LOGOFF;
quit;
Comments