Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm having few csv files which I want to load in qlikview.
Is it possible to use union while loading csv files just like the way we use in sql queries
In place of the Union in qlikview you can go for Joins( Left,Right,Inner,Join) but if the column names are same then use Concatenate
Eg:-
Load Field1,Field2.... From Location
Concatenate
Load Field1,Field2.... From Location
Concatenate
Load Field1,Field2.... From Location
Note If column name are same then you just load the table qlikview concatenate the same field name tables.
Just a clarification, the column names doesn't necessarily have to be the same to use concatenate.If they're not the same, the new columns will be added from the new table. This can be desired if you for example wish to merge two fact tables in the same model.
And even if column names are different but you want them to be the same altogether, rename them as you load each successive .csv file.
Eg:
Load Field1,Field2.... From Location;
Concatenate
Load Piece1 AS Field1,Piece2 AS Field2.... From Location;
Concatenate
Load Fragment AS Field1, Date AS Field2.... From Location;
If all files have matching column names, and they have comparable filenames, use the simplest of all simple LOAD statements:
BigTable:
LOAD * FROM 'File-*.csv' (...);
Best,
Peter
Then Rename the fields as appropriate name to make same see the example below
Load Field1,Field2.... From Location
Concatenate
Load ColA as Field1, ColB as Field2.... From Location
Concatenate
Load FirstField as Field1,SecondField as Field2.... From Location