Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Load Concatenate

Hello i've used this istruction to load some data in qlikview:

COUNTRIES:

LOAD Country,

     Capital,

     [Area(km.sq)],

     Round(Num#(Trim([Population(mio)]))) as Population,

     [Pop. Growth],

     Currency,

     Inflation,

     [Official name of Country]

FROM

$(m_oszSourcesFile)Country1.csv

(txt, codepage is 1252, embedded labels, delimiter is ',');

COUNTRIES:

Concatenate(COUNTRIES)

LOAD Country,

     Capital,

     [Area(km.sq)],

     Round(Num#(Trim([Population(mio)]))) as Population,

     [Pop. Growth],

     Currency,

     Inflation,

     [Official name of Country]

FROM

$(m_oszSourcesFile)Country2.csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

COUNTRIES:

Concatenate(COUNTRIES)

LOAD Country,

     Capital,

     [Area(km.sq)],

     Round(Num#(Trim([Population(mio)]))) as Population,

     [Pop. Growth],

     Currency,

     Inflation,

     [Official name of Country]

FROM

$(m_oszSourcesFile)Country3.csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

I need to load the data of three different csv in a single table.

The loading process works but there are 2 data duplicated in the table generated and using the count function to get the total number of rows it returns a number that is the effective total of rows plus 5 elements (2 element is ok but the other three?).

I have manually checked the data.

The csv are comma separated data.

Have i made some mistakes in the load script?

Thanks!

Marco

18 Replies
swuehl
MVP
MVP

Marco,

I can't see anything wrong with your code at the moment.

Any chance that you upload your csv files (or part of the files that demonstrate your issue) here to the forum (use advanced editor or edit your first posting to be able to upload files).

marco_puccetti
Partner - Creator
Partner - Creator
Author

These are the files i have loaded.

Thanks you.

Marco

swuehl
MVP
MVP

Ok, I get 197 rows loaded into my data model.

Which ones are the assumingly duplicated?

marco_puccetti
Partner - Creator
Partner - Creator
Author

Haiti and Ivory Coast are the two cities duplicated.

So my load procedure is correct and generate one table with all the three csv data?

Marco

swuehl
MVP
MVP

I just can't see any problems.

I've attached the application. Please check.

marco_puccetti
Partner - Creator
Partner - Creator
Author

I can't understand how can be possible, because i've read that Qlikview's strongness is associative technology.

So duplicate data that are key field should be present once time.

Isn't it?

How can i solve this problem?

Thank you.

Marco

swuehl
MVP
MVP

I can't understand how can be possible, because i've read that Qlikview's strongness is associative technology.

So duplicate data that are key field should be present once time.

Marco,

I am sorry, I just don't get your point.

I don't see any duplicate data, Haiti and Ivory Coast are not duplicated as far as I see (frequency = 1).

All records are loaded into one single table, so there is not key involved. Are you using a more complex data model?

Then you need to post more details.

Not applicable

Hi,

Since all your fields are the same, you can load everything in 1 single statement and everything will be concatenated automatically:

COUNTRIES:

LOAD Country,

     Capital,

     [Area(km.sq)],

     Round(Num#(Trim([Population(mio)]))) as Population,

     [Pop. Growth],

     Currency,

     Inflation,

     [Official name of Country]

FROM

$(m_oszSourcesFile)Country*.csv

(txt, codepage is 1252, embedded labels, delimiter is ',');


Basically instead of Country1, Country2 and Country3 use "Country*".

marco_puccetti
Partner - Creator
Partner - Creator
Author

Well, i have simply loaded data in a single table with the attached results.

Marco