Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Lets say i have a txt file that looks like this
"a":"1", "b":"2", "c":"3" and so on
How do i get this to be a table like this?
a,b,c
1,2,3
If i just load the txt file then the column names will be "a":"1" and no field values
Try this
I have created a text file with data as "a":"1", "b":"2", "c":"3"
Dummy:
LOAD
@1
FROM [lib://Data/file.txt]
(txt, codepage is 28591, no labels, delimiter is ';', msq);
Test:
load Distinct
SubField(fieldname,':',1) as Dim,
SubField(fieldname,':',2) as Val,
;
load Distinct
SubField(PurgeChar(@1,'"'),',') as fieldname
Resident Dummy;
drop Table Dummy;