I have a tab separated CSV file in D:\DataSet\business_names_202007/businessDataSet.csv
with 600k records (which may increase). I want to load entire data into below postgresql table.
PostgreSQL table:
CSV file structure:
As you can see above structure, column count differs between CSV file and db ("transform_business" column extra in DB). while loading data we need to add this as well, the value for this column is given below.
"transform_business" column value in db is same as "BN_NAME" in the DataSet with following changes: Convert to UPPERCASE and all spaces should be removed between words
eg:
BN_NAME: Melbourne Collision Repair
transform_business: MELBOURNECOLLISIONREPAIR
Tool: Dbeaver
DB Schema: testDev
tablename: testdevtable
Temporarily formed copt statement:
COPY testdevtable(register_name,bn_name,bn_status,transform_business)
FROM 'D:\DataSet\business_names_202007/businessDataSet.csv' DELIMITER E’\t’ CSV HEADER;