Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What is the difference between load $(a) autogenerate 1 and load $(a) as column_name autogenerate 1
I want to understand how giving an alias name is making difference to the output.
table:
load *;
for a=1 to 10
LOAD $(a) as number//displays numbers 1 -10 in output
AUTOGENERATE 1;
next
tablef:
load *;
for a=1 to 9
load $(a) AutoGenerate 1 ;//displays only 1 in output
next
In the first Script since a field name is given, Qlik will auto-concatenate the data
in the second script since there is no field name; qlik will assign an different fieldname for each iteration, so you should have multiple tables, you can check the data model viewer
In your second statement (without an alias/field name) - the values are themselves the name of the field. And you would not find only 1 but 9 fields with single value in it (value and field are same) creating separate tables.
In the first Script since a field name is given, Qlik will auto-concatenate the data
in the second script since there is no field name; qlik will assign an different fieldname for each iteration, so you should have multiple tables, you can check the data model viewer
In your second statement (without an alias/field name) - the values are themselves the name of the field. And you would not find only 1 but 9 fields with single value in it (value and field are same) creating separate tables.