How to import a csv where one header is empty and preserve the * in load statement?
In the load editor we want to use the * symbol instead of listing all header names individual to keep flexibel.
Type is .csv
The header names are located in row 1
Issue is that "cell" B1 has a empty header name.
How can I use the "embedded labels" names are in row 2 without loosing the * in the load statement?
set Import_Location = 'random netwerk location';
load * inline [ FIELD A B C
FOR Each i in FieldValueList('FIELD') Trace #### LOAD_DATA_IN_MEMORY ####;
LOAD_DATA: LOAD distinct Date(Date#(Textbetween(UPPER(Filename()),'$(i)' & '.','.CSV'),'YYYYMMDD')) As Date, * FROM [$(Import_Location)]$(i).*.csv (txt, codepage is 1252, embedded labels, delimiter is ',', msq) where left([ID],10) <> 'Disclaimer' and [ID] <> 'Total';
Re: How to import a csv where one header is empty and preserve the * in load statement?
I think this won't be possible - either you could use the wildcard-logic as it is or not respectively you will need additional steps like loading the first two records and building a fieldlist or a mapping-table from these data per functions like fieldname(), peek() and if() + some string-functions within loops. Here a few examples to similar cases: