Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm getting the 'Execution of script failed' message (but no explanation why).
It's happened since I added in a section to reload the same datasource, but as a cross table.
Is anyone able to see where I'm going wrong? I don't think I have any loops in there...
TABLE_DATA:
LOAD
'$(vProgress1)' as Progress_point,
ID,
ApplyMap('Long_map',Type) as Type_long,
Set as Initial_Set,
Current,
Expected
FROM
[..\Data received\$(vProgress1)\$(vFilename1).xlsx]
(ooxml, embedded labels, table is [Data template]);
temp1:
CrossTable(Cat, Outcome, 10)
LOAD
'$(vProgress1)' as Progress_point,
ID,
ApplyMap('Long_map',Type) as Type_long,
Set as Initial_Set,
Current,
Expected
FROM
[..\Data received\$(vProgress1)\$(vFilename1).xlsx]
(ooxml, embedded labels, table is [Data template]);
LEFT JOIN (TABLE_DATA) LOAD *
Resident temp1;
Drop TABLE temp1;
LEFT JOIN (TABLE_DATA) LOAD *
Resident temp1;
Drop TABLE temp1;
LE temp1;LE
It it helps, what I wanted from the original 'TABLE_DATA' is to keep 'Current' and 'Expected' as they are. But then also add two new fields, one called 'Outcome' which would hold the values of Current and Expected, and and another called 'Cat' which would tell me whether the Outcome was from the Current or Expected field.
Another thing I saw is that in the cross table you have a 10 in the config (first line) and you only have 6 fields.
What happens if you just run these two? Picked from the script above. Include your Mapping load too.
TABLE_DATA:
LOAD '$(vProgress1)' as Progress_point,
ID,
ApplyMap('Long_map',Type) as Type_long,
Set as Initial_Set,
Current,
Expected
FROM [..\Data received\$(vProgress1)\$(vFilename1).xlsx] (ooxml, embedded labels, table is [Data template]);
temp1:
CrossTable(Cat, Outcome, 10)
LOAD '$(vProgress1)' as Progress_point,
ID,
ApplyMap('Long_map',Type) as Type_long,
Set as Initial_Set,
Current,
Expected
FROM [..\Data received\$(vProgress1)\$(vFilename1).xlsx] (ooxml, embedded labels, table is [Data template]);
I'm getting the 'Execution of script failed' message (but no explanation why).
Maybe you are using a reseved word "SET" in the data fields.
Another thing I saw is that in the cross table you have a 10 in the config (first line) and you only have 6 fields.
The original file itself has 10 fields, so that wouldn't be an issue. And the word 'Set' in a data field also shouldn't matter...
But thanks for the suggestions
Maybe the file is used by another program, I had problems with this, but trying to save a QVD
So you are loading the same data set twice one where you crosstable and one where you don't? what's the use?
Nope, not being used anywhere else!
Hi Sunny,
Yes, same data set being loaded twice.
The reason is, what I wanted from the original 'TABLE_DATA' is to keep 'Current' and 'Expected' as they are (i.e. two distinct fields).
But then I also want to add two new fields, one called 'Outcome' which would hold the values of Current and Expected, and and another called 'Cat' which would tell me whether the Outcome was from the Current or Expected field.