Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Load XML File, Multiple Tables, Link Variables

Here is an example of an XML load. I got an error originally when each table had the same variable name (loops). I changed Varname to Var2 to load but in reality these tables should be joined by this variable. How do I join without getting the error?

QUESTION:
LOAD SERVICE,
    VARNAME AS VAR2,
    QUESTION_TEXT,
    %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER
FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);

'ANALYSIS/RESPONSE':
LOAD VARNAME,
    VALUE,
    %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: DATA_EXPORT/PATIENTLEVELDATA
FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);

1 Solution

Accepted Solutions
dennisnet
Valued Contributor III

Re: Load XML File, Multiple Tables, Link Variables

Hi There.

Did you try this:

QUESTION:

LOAD SERVICE,

    VARNAME,

    QUESTION_TEXT,

    %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER

FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);

Join (QUESTION)

LOAD VARNAME,

    VALUE,

    %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: DATA_EXPORT/PATIENTLEVELDATA

FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);

?

2 Replies
dennisnet
Valued Contributor III

Re: Load XML File, Multiple Tables, Link Variables

Hi There.

Did you try this:

QUESTION:

LOAD SERVICE,

    VARNAME,

    QUESTION_TEXT,

    %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER

FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);

Join (QUESTION)

LOAD VARNAME,

    VALUE,

    %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: DATA_EXPORT/PATIENTLEVELDATA

FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);

?

SunilChauhan
Esteemed Contributor

Load XML File, Multiple Tables, Link Variables

name VARNAME as var2 in scond table then join to first table.

use below code

QUESTION:
LOAD SERVICE,
    VARNAME AS VAR2,
    QUESTION_TEXT,
    %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER
FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);

'ANALYSIS/RESPONSE':

join(QUESTION)
LOAD VARNAME as VAR2,
    VALUE,
    %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);