èexample
of edbldr ç=
smaple .csv file:
city.csv
nashik,MH,2000
pune,MH,3000
bhopal,MP,2000
sample of .ctl file:
city.ctl
LOAD DATA
INFILE 'city.csv'
BADFILE 'city.bad'
insert
INTO TABLE city_1
FIELDS TERMINATED
BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(name,state,public)
-->insert data into city_1 table(database test)
[enterprisedb@localhost
~]$ edbldr -d test control=city.ctl bad=city.bad log=city.log
EDB*Loader: Copyright (c) 2007-2017, EnterpriseDB
Corporation.
Enter the user name : enterprisedb
Enter the password :
Successfully processed (3) records
[enterprisedb@localhost
~]$ edb-psql -d test -U enterprisedb
psql.bin (10.1.5)
Type "help" for help.
test=# select * from city_1;
name | state | public
--------+-------+--------
nashik | MH |
2000
pune | MH
| 3000
bhopal | MP |
2000
(3 rows)
test=# exit
with edb loader i am facing one issue, when i am trying to load heavy data on the EDB database, bad file generation is very slow as compare to oracle. in my test scenario i did the testing with one CSV file having count was 1.7 lakh and i set 1 lakh record as bad record just change the filled length in table. after executing the edbldr command it take around one hour to complete the process, without bad records loading is okay and processing time was 4 sec. so if u have any idea how we can increase the bad file generation processing. pls help. same scenario tested with oracle and no issue observed with bad records processing time was 5 sec. with 1 lakh bad records.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHello Ravindra,
ReplyDeleteI'm newbie in EDB Loader. I have to make a remote loading without using standard input but with INFILE on the remote host.
How can I do?
I always have an error (No such file or directory) because edbldr looks for file on the database server..
Thank you!