Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
ramshoney
Contributor

Noconcatenate

     Hi I'm Facing weird behavior / any mistake in my writing. Below is how it looks like.

LIB CONNECT TO 'Impaladb';

LOAD aa,

          bb,

          cc;

SQL SELECT aa,

                      bb,

                      cc

FROM IMPALA.dba.'table1';

LIB CONNECT TO 'Impaladb';

NoConcatenate

LOAD aa,

          ee,

          ff;

SQL SELECT aa,

                      ee,

                      ff

FROM IMPALA.dba.'table1';

After loading, I'm able to see the Join between the tables in Data model, how to restrict the Join.

--Rams

7 Replies
ramshoney
Contributor

Re: Noconcatenate

Sorry the second one is Table2.

mark6505
Valued Contributor III

Re: Noconcatenate

HI,

I am not a 100% sure I follow.

But if you would like to load both tables without joining you just need to alias one of the joining field. Like below.

LIB CONNECT TO 'Impaladb';

LOAD aa,

          bb,

          cc;

SQL SELECT aa,

                      bb,

                      cc

FROM IMPALA.dba.'table1';

LIB CONNECT TO 'Impaladb';

NoConcatenate

LOAD aa          AS AAT1,

          ee,

          ff;

SQL SELECT aa,

                      ee,

                      ff

FROM IMPALA.dba.'table1';

I would normally advise adding table name before the load i.e. Table1:

Mark

cazztfplease
Contributor

Re: Noconcatenate

Hi Ramesh,

Qlik will associate the tables since they share the field 'aa'.  To generate 2 tables that are not associated, amend your script so 'aa' is not a shared field.  Simple fix as such should work:

LIB CONNECT TO 'Impaladb';

LOAD aa,

          bb,

          cc;

SQL SELECT aa,

                      bb,

                      cc

FROM IMPALA.dba.'table1';

LIB CONNECT TO 'Impaladb';

LOAD aa as AA_table2,

          ee,

          ff;

SQL SELECT aa,

                      ee,

                      ff

FROM IMPALA.dba.'table1';

Just remember that the 'aa' field in Table 2 will be referenced as AA_table2. (Or whatever you choose to name the field. )

An autoconcatenate will only occur if two loaded tables have the same fields.  No need to use Noconcatenate, as these two tables will not autoconcatenate, as they have different fields.

ramshoney
Contributor

Re: Noconcatenate

Mark Thanks for the kind reply, Ya I have planned to do the same.

But Issue was i have few many tables when i need to avoid the common column join and need to specify my join. Then what is the use of Noconcatenate in front of LOAD|SELECT statement. I feel there is no Use of Noconcatenate its just limited.

cazztfplease
Contributor

Re: Noconcatenate

clarification: An autoconcatenate will occur if both tables 1 and 2 have all the same field names. 

agigliotti
Honored Contributor II

Re: Noconcatenate

OR

Qualify '*';

LIB CONNECT TO 'Impaladb';

LOAD aa,

          bb,

          cc;

SQL SELECT aa,

                      bb,

                      cc

FROM IMPALA.dba.'table1';

LIB CONNECT TO 'Impaladb';

LOAD aa,

          ee,

          ff;

SQL SELECT aa,

                      ee,

                      ff

FROM IMPALA.dba.'table2';

mark6505
Valued Contributor III

Re: Noconcatenate

HI,

NoConcatenate is used to stop the auto concatenation of two table when the they have the same field names.

The most common use I find is when I load source data and then want to start doing further data manipulation to the table

Mark

Community Browser