Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
dradoikov
Partner - Contributor III
Partner - Contributor III

Union of two tables in Qlik Sense

Hi,

I'm trying to do a UNION of two QVD tables with exatly the same fields in Qlik Sense. In QlikView it is done automatically. I also tried the functuion CONCATENATE, but it also does not work. The error is:BuildErrorForVMap: Internal Error occurred in call to vMap function; calling function: void CTable::LoadQvc.

Is there any soution?

Thanks

1 Solution

Accepted Solutions
Michael_Tarallo
Employee
Employee

Hi Jagan,

I confirmed this behavior - and reported it - it seems that when the .qvd files are created with Sense in this manner, it does not work as expected.

Mike

Regards,
Mike Tarallo
Qlik

View solution in original post

14 Replies
Michael_Tarallo
Employee
Employee

Hi Daniel - can you provide your sample script? screenshots? steps? So our team can help support you with this?

Thanks

Mike

Regards,
Mike Tarallo
Qlik
dradoikov
Partner - Contributor III
Partner - Contributor III
Author

Here is an example of the script:

LOAD

    Field1,

    Field2,

    Field3

FROM 'lib://Apps/Table1.QVD'

(qvd);

//Concatenate


LOAD

    Field1,

    Field2,

    Field3

FROM 'lib://Apps/Table2.QVD'

(qvd);

I'm trying it both with/without the commented "Concatenate" keyword and it does not work.

Michael_Tarallo
Employee
Employee

Hi Daniel -

I just took two QVD files I created in QlikView 11 - and brought them into Sense like this:

LOAD

    ORDER_NUM,

    PROD_NUM,

    ORDER_DATE,

    STORE_CODE,

    QUANTITY,

    LINEPRICE,

    LINE_COGS,

    PLANTLNG,

    order_status

FROM 'lib://data/orders_table.qvd'

(qvd);

LOAD

    STORE_CODE,

    STORENAME,

    STATE,

    REGION,

    City,

    Latitude,

    Longitude

FROM 'lib://data/comp_table.qvd'

(qvd);

Here is my Data Model:

8-20-2014 9-16-36 AM.png

This occurred automatically - I did not need to use the concatenate statement.

Can you attach your .QVD files?

Mike

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

Try my attached .QVD files here and let me know.

Mike

Regards,
Mike Tarallo
Qlik
dradoikov
Partner - Contributor III
Partner - Contributor III
Author

Hi Mike,

I'm tryng to make a UNION of two tables. In QlikView it is done automatically when all the fields names are exactly the same. The result is not a connection between the two tables but a table with the content from both. In Qlik Sense the above mentioned error occurs.

Michael_Tarallo
Employee
Employee

I apologize - I misunderstood -

Try the attached QVD files to make sure they work in your environment.

I performed this:

LOAD

    id,

    first_name,

    last_name

FROM 'lib://data/table1.qvd'

(qvd);

LOAD

    id,

    first_name,

    last_name

FROM 'lib://data/table2.qvd'

(qvd);

And got the UNIONed expected results.

8-20-2014 10-33-29 AM.png

8-20-2014 10-35-24 AM.png

Regards,
Mike Tarallo
Qlik
jagan
Luminary Alumni
Luminary Alumni

Hi Daniel,

Try like this

Data:

LOAD

    id,

    first_name,

    last_name

FROM 'lib://data/table1.qvd'

(qvd);

Concatenate(Data)

LOAD

    id,

    first_name,

    last_name

FROM 'lib://data/table2.qvd'

(qvd);

Regards,

Jagan.

dradoikov
Partner - Contributor III
Partner - Contributor III
Author

Hi Mike and Jagan,

I think there is a problem when the tables are qvd files. I tried with two simple excel files with the same column names.

1.png and 2.png

When they are loaded, the result is the expected concarenated table with data from "a" to "h".

But if I try to save the excel files into qvd ones and then to load them, the result is:

3.png

Here is the whole code I write:

Table1:

LOAD

    Column1,

    Column2

FROM 'lib://Data/Table1.xlsx'

(ooxml, embedded labels, table is Sheet1);

store Table1 into Table1.qvd;

drop table Table1;

Table2:

LOAD

    Column1,

    Column2

FROM 'lib://Data/Table2.xlsx'

(ooxml, embedded labels, table is Sheet1);

store Table2 into Table2.qvd;

drop table Table2;

LOAD

    Column1,

    Column2

FROM 'lib://Data/Table1.qvd'

(qvd);

LOAD

    Column1,

    Column2

FROM 'lib://Data/Table2.qvd'

(qvd);

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Table1:

LOAD

    Column1,

    Column2

FROM 'lib://Data/Table1.xlsx'

(ooxml, embedded labels, table is Sheet1);

store Table1 into Table1.qvd;

drop table Table1;

Table2:

LOAD

    Column1,

    Column2

FROM 'lib://Data/Table2.xlsx'

(ooxml, embedded labels, table is Sheet1);

store Table2 into Table2.qvd;

drop table Table2;

Data:

LOAD

    Column1,

    Column2

FROM Table1.qvd

(qvd);

Concatenate(Data)

LOAD

    Column1,

    Column2

FROM Table2.qvd

(qvd);

If not working then try to give the full file path for QVDs.

Regards,

Jagan.

Regards,

Jagan.