Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Loading multiple CSV files from Data Inbox

Hi,

I'm trying to create a very simple program to compare two files (based on an ID variable)--the files are getting too big for Excel. I've loaded two CSV files in a data inbox. I can import either one individually with no problem. However, when I try to import both upon load I'm told the second doesn't exist. Below is the code for the first file. The second is exactly the same exept it has "File2_temp." I cannot find an existing thread on this. Is there a command I need to use? I tried 'noconcatenate' but that didn't make any difference.

//*******************************************************

File1_temp:

LOAD

    DONOR_ID,

    TITLE,

    FIRST_NAME,

    MIDDLE_NAME,

    LAST_NAME,

    SUFFIX,

    OPT_LINE,

    ADDRESS,

    ADDRESS2,

    CITY,

    STATE,

    ZIP,

    SALUTATION,

    IN_AMT,

    INITIAL_GIFT_DATE,

    LAST_CONTRIB_AMT,

    LAST_CONTRIB_DATE,

    MAX_AMT,

    MAX_DATE,

    GIFTS

FROM [lib://Data Inbox - Marketing/USAM1708 Final for Vendor.csv]

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

Any suggestions are appreciated.

1 Solution

Accepted Solutions
felipedl
Valued Contributor III

Re: Loading multiple CSV files from Data Inbox

Hi Brian

The second table won't "exist" because it it automatically concatenated into the first load because both files share the same number of fields and same name (have the same structure).

Do something like:

File1_temp:

LOAD

    DONOR_ID,

    TITLE,

    FIRST_NAME,

    MIDDLE_NAME,

    LAST_NAME,

    SUFFIX,

    OPT_LINE,

    ADDRESS,

    ADDRESS2,

    CITY,

    STATE,

    ZIP,

    SALUTATION,

    IN_AMT,

    INITIAL_GIFT_DATE,

    LAST_CONTRIB_AMT,

    LAST_CONTRIB_DATE,

    MAX_AMT,

    MAX_DATE,

    GIFTS

FROM [lib://Data Inbox - Marketing/USAM1708 Final for Vendor.csv]

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

NoConcatenate

File2_temp:

LOAD

    DONOR_ID,

    TITLE,

    FIRST_NAME,

    MIDDLE_NAME,

    LAST_NAME,

    SUFFIX,

    OPT_LINE,

    ADDRESS,

    ADDRESS2,

    CITY,

    STATE,

    ZIP,

    SALUTATION,

    IN_AMT,

    INITIAL_GIFT_DATE,

    LAST_CONTRIB_AMT,

    LAST_CONTRIB_DATE,

    MAX_AMT,

    MAX_DATE,

    GIFTS

FROM [lib://Data Inbox - Marketing/USAM1708 Final for Vendor.csv]

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

It will generate a syntethic key this way, because they're basically the same file, only having different values.


Felipe.

3 Replies
felipedl
Valued Contributor III

Re: Loading multiple CSV files from Data Inbox

Hi Brian

The second table won't "exist" because it it automatically concatenated into the first load because both files share the same number of fields and same name (have the same structure).

Do something like:

File1_temp:

LOAD

    DONOR_ID,

    TITLE,

    FIRST_NAME,

    MIDDLE_NAME,

    LAST_NAME,

    SUFFIX,

    OPT_LINE,

    ADDRESS,

    ADDRESS2,

    CITY,

    STATE,

    ZIP,

    SALUTATION,

    IN_AMT,

    INITIAL_GIFT_DATE,

    LAST_CONTRIB_AMT,

    LAST_CONTRIB_DATE,

    MAX_AMT,

    MAX_DATE,

    GIFTS

FROM [lib://Data Inbox - Marketing/USAM1708 Final for Vendor.csv]

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

NoConcatenate

File2_temp:

LOAD

    DONOR_ID,

    TITLE,

    FIRST_NAME,

    MIDDLE_NAME,

    LAST_NAME,

    SUFFIX,

    OPT_LINE,

    ADDRESS,

    ADDRESS2,

    CITY,

    STATE,

    ZIP,

    SALUTATION,

    IN_AMT,

    INITIAL_GIFT_DATE,

    LAST_CONTRIB_AMT,

    LAST_CONTRIB_DATE,

    MAX_AMT,

    MAX_DATE,

    GIFTS

FROM [lib://Data Inbox - Marketing/USAM1708 Final for Vendor.csv]

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

It will generate a syntethic key this way, because they're basically the same file, only having different values.


Felipe.

Not applicable

Re: Loading multiple CSV files from Data Inbox

Hi Felip,

Thank you. As noted above, I was using the noconcatenate. But, I just noticed I'd forgotten to uncomment an inner join I was doing that addressed the issue. Appreciate you taking the time to respond.

Thanks,

Brian

felipedl
Valued Contributor III

Re: Loading multiple CSV files from Data Inbox

Hi Brian,

Didn't actually see you commenting on the noconcatenate (my mistake).

Yeah the join could have that effect too.

Glad you resolved your problem (you should've marked your own anwser as correct since mine wasnt right, but thanks anyway ).