Hi Experts, I am new to Tera data development... I am trying to insert multiple files that are in csv format into one tera data table... The code mentioned below works file for one file at a time but I have 3 years of data in csv format for each individual day.. I have to load n number of tables like this. I want to run the script mentioned below through our inhouse application and load all the data at once into the table.
Can some one help me solve this. the data is in files with following name format.
Hi, I have not understood your question. You are saying 1)"I am trying to insert multiple files that are in csv format into one tera data table..." if you want to insert into one table then This can be achieved in 2 ways a)If you are executing the job through unix you can make the job as loop You can pass the file to be loaded as a parameter from a parameter file so each time the loop executed the parameter will change and the next file will be taken and loaded in the same table. You can create the script with additional code as below
.ACCEPT FILE_NAME FROM FILE /bdw/nrd/devt/scripts/Scr-16100-AVQ_SG/params.txt; .IMPORT INFILE /sourcepath/&FILE_NAME FORMAT VARTEXT
wherein the param.txt will have full file name. b) Concatenate the files into 1 if the size is small but I think this will not be possible.
2) "I have to load n number of tables like this." If the table names are also different then you can create a common parameter name for file and table name and pass it to loading script using same as above. something like below