Hi,
Here are the steps how to use EnterpriseDB EDBLDR.
Step 1: Create Control file like in Oracle using "sqlldr"
[enterprisedb@localhost bin]$ more csv.ctl
LOAD DATA
INFILE '/tmp/test1.csv'
BADFILE '/tmp/test.bad'
DISCARDFILE '/tmp/test.dsc'
INSERT INTO TABLE test
FIELDS TERMINATED BY ","
(t date)
Step 2: Create/Generate CSV Files like as below
[enterprisedb@localhost bin]$ more /tmp/test1.csv
"10-10-10 10:10:10"
Step 3: Create the required table structure. In this example, we have taken only one column with the table name called test(t timestamp).
CREATE TABLE TEST(T timestamp);
Step 4: Execute the EDBLDR as using the below command.
[enterprisedb@localhost bin]$ ./edbldr -d edb -p 5444 userid=enterprisedb/adminedb control=csv.ctl
NOTICE: the specified DATE mask (dd-mm-yy hh:mi:ssAM) will be ignored by the server
EDB*Loader: Copyright (c) 2007, 2008 EnterpriseDB.
Successfully loaded (1) records
--Dinesh
Comments
Post a Comment