Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my CSV one column doesn't have colum header. I want to import that colum too
EX:
see below
USER | NAME | |
fdf | 1213 | rrgfrg |
gfgf | 243343 | gfg |
fgfg | 3434 | gfg |
Also in another CSV one colum is unavailable in some times,
is it possible to add if condition in script to load data of that colum when it's available in CSV . i use below syntax but doesn't work
if(len([ID])=0,' ',[ID]) as [ID],
I am not sure whether it is possible to do so or not.
But I will advice you to add a column name to your CSV file and then load it.
Regards,
Varsha.
Hi Anuradha,
Load all the data with columns and add the where clause like below so that it will load all files even if the one of header is blank. It will load only data without headers.
LOAD A,
B
FROM
(ooxml, explicit labels, table is Sheet1) where RecNo()>1;
Thanks,
Sreeman
May be try this..
Instead of Embedded Labels (File Wizard), Load with 'No Labels', then you can change the Name..
like
T1:
LOAD RowNo() as Key,
@1,
@2,
@3
FROM
..\Book1.csv
(txt, codepage is 1252, no labels, delimiter is ',', msq);
NoConcatenate
T2:
LOAD @1 as USER,
@2 as Missing_Header,
@3 as NAME
Resident T1 Where Key>1;
DROP Table T1;