Load a csv with a header and use header date as a column
Hi, I have a csv file that has a header containing the date the file was created. I need to grab the date but not load the row into the table. The load should then proceed to load the actual column data but use the date to populate an additional date column that doesn't exist as a column in the csv.
Re: Load a csv with a header and use header date as a column
Try something like this:
(txt, codepage is 1252, no labels, delimiter is ';', msq);
let vDate = mid(FieldValue('@1',1),15, Len(FieldValue('@1',1))-21);
drop tables Tmp;
'$(vDate)' as Date,
(txt, codepage is 1252, embedded labels, delimiter is ';', msq, filters(
Remove(Row, Pos(Top, 1))
What I did was loading only the first column to get the date created. Then i created a variable to get the value of the first field of the first column and did some transformations to get the date (you probably have to fine tune this)
Then I loaded the whole table another time, removed the first row and added the data variable as a field.