Reputation: 169
Basically I'd like to define a scalar and then use that scalar inside of a datatable. Something like:
let dayOne = "Day One";
let dayTwo = "Day Two";
let dayStringMapping = datatable(Batch: int64, BatchDay: string)
[
01, dayOne,
02, dayTwo
];
How can I do this?
Upvotes: 6
Views: 3431
Reputation: 25905
The datatable
operator requires constant scalar values as its input.
An alternative approach could be using the print
operator.
If required, you can union
several rows generated by multiple usages of the print
operator.
For example:
let dayOne = "Day One";
let dayTwo = "Day Two";
let dayStringMapping =
union (print Batch = 1, BatchDay = dayOne),
(print Batch = 2, BatchDay = dayTwo);
... do something with 'dayStringMapping' ...
Upvotes: 9