Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
alexeyrv
New Contributor II

How to use own prefix to fields with qualify ?

Hi all.

Questions is - How to manually define the prefix to loading fields.
Goal - prefix should be readable.

Defalult manner - prefix is equal to table name.

Problem - Sometimes a table name from source unreadable like "Sheet123" or "DB12s5eb011-a2".
This kind of naming is very unusable even for a developer.

Is it possible to redefine manually field prefix for all fields in a table with own prefix string instead of table name? Something the qulify example in the Qlik help below but with declaration my own prefix.

Maybe  "LOAD A,B from x.csv where $prefix='xregion';"

"Qualify B;
LOAD A,B from x.csv;
LOAD A,B from y.csv;

The two tables x.csv and y.csv are associated only through A. Three fields will result: A, x.B, y.B.In the same way I want to ignore some fields that should be key feilds like ID or Date."

I can't find an answer to my problem.
Thanks in advance.
Alexey

 

4 Replies
Partner
Partner

Re: How to use own prefix to fields with qualify ?

If you are writing your own load script you can name the tables whatever you want.

Qualify *;

Sales:

Load * from XYZ.qvd;

Marcos_rv
Contributor II

Re: How to use own prefix to fields with qualify ?

 

Try this:

Qualify *;

unqualify A ; // key field  

x:

LOAD

A,

B

from x.csv;

y:

join(x) 
LOAD

A,

B

from y.csv;

unqualify *;

saludos!!!

alexeyrv
New Contributor II

Re: How to use own prefix to fields with qualify ?

Yes. But goal to name fields with right prefix.
Automatický prefix of field equal to the name of SQL table or sheet in
excel.

I will try to use variables.
It gives an ability to create flexible ETL.
Partner
Partner

Re: How to use own prefix to fields with qualify ?

the naming of the fields for a qualified table happens when you load the table initially. You probably have to load Table1 qualified and then load table 2 qualified and then combine them (ie join or concatentate) in a separate step. This way the qualified names are already established.