Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field within my data source, called 'Lifetime Post Consumptions by type - video play. This field represents video content that is watched. If during a given week, there were no videos watched, the field is omitted from the data offload by the data source.
This causes an error in my script. Can I do anything in the script to essentially if this field is non-existent, skip without corrupting the rest of the load?
Hi,
You can do something like this:
MyTable:
LOAD
*
from Source
;
LET vFieldNo = NoOfFields('MyTable');
if(vFieldNo = x) then
'load all the fields'
else 'load all the fields less the video one'.
The variable vFieldNo returns the number of columns.
It turns out that field was non-essential to my script after all. I needed to pare down what I was attempting to load in instead of just everything. Thank you for this though, I will try using it to see if it will work in the event I come across a similar situation.