Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ray123
Contributor II
Contributor II

Add Prefix to all Dimension & Measure names when doing Binary Load

Hi All, 

In my Data Load Editor, I am doing two Binary loads, like this: 

 

  • binary [path] example_1.qvw
  • binary [path] example_2.qvw

Both files are containing many dimensions and measures. Therefore, I would like to clearly distinct these two. 

My question: 

Can we add a prefix to all the Dimensions and Measures when doing a binary load? 

Current situation would be:

  • From the first qvw: 
  • Measure: sales 
  • Dimension: country 

 

  • From the second qvw:
  • Measure:sales
  • Dimension: country 

Desired situation would be: 

  • Measure: example_1_sales
  • Dimension: example_1_country
  • Measure: example_2_sales
  • Dimension: example_2_country

Hope someone has a solution for this. 

 

Thanks a lot! 

 

 

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
joaopaulo_delco
Partner - Creator III
Partner - Creator III

@Ray123 , I think you should use the "Qualify" statement to automate the name of fields.

Try somenthing like this:

binary [path] example_1.qvw
binary [path] example_2.qvw

Qualify *;
Rename Table example_1 to example_1_TMP;
Noconcatenate
[example_1]:
Load
*
Resident example_1_TMP;

Drop Table example_1_TMP;

Rename Table example_2 to example_2_TMP;
Noconcatenate
[example_2]:
Load
*
Resident example_2_TMP;

Drop Table example_2_TMP;

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

3 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

i @Ray123 !

         I think that you can try something like this:

 

binary [path] example_1.qvw
binary [path] example_2.qvw

Rename Table example_1 to example_1_TMP;
Noconcatenate
[example_1]:
Load
sales as example_1_sales,
country as example_1_country
Resident example_1_TMP;

Drop Table example_1_TMP;

Rename Table example_2 to example_2_TMP;
Noconcatenate
[example_2]:
Load
sales as example_2_sales,
country as example_2_country
Resident example_2_TMP;

Drop Table example_2_TMP;

Help users find answers! Don't forget to mark a solution that worked for you!
Ray123
Contributor II
Contributor II
Author

Thansk a lot! This looks promising, however is there also a way to automate that? 

 

For example, now we need to specify all dimensions/measures like sales as example_2_sales. But is there a way to automatically 'paste' the 'example_2' before all dimensions/measures of a specific qvw? 

 

Many thanks

joaopaulo_delco
Partner - Creator III
Partner - Creator III

@Ray123 , I think you should use the "Qualify" statement to automate the name of fields.

Try somenthing like this:

binary [path] example_1.qvw
binary [path] example_2.qvw

Qualify *;
Rename Table example_1 to example_1_TMP;
Noconcatenate
[example_1]:
Load
*
Resident example_1_TMP;

Drop Table example_1_TMP;

Rename Table example_2 to example_2_TMP;
Noconcatenate
[example_2]:
Load
*
Resident example_2_TMP;

Drop Table example_2_TMP;

Help users find answers! Don't forget to mark a solution that worked for you!