Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
To store an evaluated expression as a field in data load editor, one can do this:
Let vMonth = FileName();
LOAD
$(vMonth) as "Month",
...
....
But how can I store the variable as a column name such that:
Let vMonth = FileName();
LOAD
"ColumnA" as $(vMonth),
...
....
where ColumnA is a field from my data source. I've played around with combinations of Set and Let and equal signs and quotation marks but to no avail.
Hi Oliver, you found out how to do it?
regards, Emma
next sample works:
Let vField = 'MyNewField';
Test:
LOAD
Year as $(vField),
* inline [
Year Quarter Sales
2012 Q1 1100
2012 Q2 1700
2012 Q3 1400
2012 Q4 1800
2013 Q1 1000
2013 Q2 1300
2013 Q3 1100
2013 Q4 1400] (delimiter is ' ');
But what return FileName() before Load statement?