i have created a table in green plum , below is the script
-- Table: staging.file_data
-- DROP TABLE staging.file_data;
CREATE TABLE staging.file_data
(
file_name character varying(28),
line_number integer,
date_line text
)
WITH (
OIDS=FALSE
)
DISTRIBUTED BY (file_name);
ALTER TABLE staging.file_data
OWNER TO dev_staging_develop;
now i need to load this table with some flat files .... the flat file has more columns , but i was asked to load this table with the flat file as 1. the first column will have the name of the file 2. second column is sequential number (line number ) 3 third column will have a string of data (which is nothing but all the data in the first row of the flat file ) and the same for every row .
so if the flat file has 100 records we will have 100 rows in the table .
but im not sure how to import this flat file into this table , can anyone help NOTE : flat file is a text file . and is located on my local machine .
thanks for your time and help in advance.
jason