Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My wish would be to get this type of operation, knowing that VALUEX is in TABLE :
Set a = 0;
Do While a < RangeMax(VALUEX) + 1
Left Join(TABLE)
Load
?????????
Resident TABLE
Where $(a) <= VALUEX;
Let a=a+1;
Loop
I tried making a variable with RangeMax and Peek, but both do not return any value.
Do you have a solution? Thanks
temp:
Load X as Key, subfield(X,'|') as Value ,'Seperate'&rowno() as Attribute Inline [
X,VALUEX
DATA | DATA1 | BIG DATA | BIG | FARM , 4
];
Generic:
Generic Load
Key,Attribute,Value Resident temp;
Set vListOfTables = ;
For vTableNo = 0 to NoOfTables()
Let vTableName = TableName($(vTableNo)) ;
If Subfield(vTableName,'.',1)='Generic' Then
Let vListOfTables = vListOfTables & If(Len(vListOfTables)>0,',') & Chr(39) & vTableName & Chr(39) ;
End If
Next vTableNo;
CombinedGenericTable:
Load distinct Key Resident temp;
For each vTableName in $(vListOfTables)
Left Join (CombinedGenericTable) Load * Resident [$(vTableName)];
Drop Table temp;
Next vTableName
this script is to filter a table and left join to another table,
what exactly are you trying to do here what is VALUEY and VALUEX ? please clarify
This is a mistake on my part, VALUEY does not exist, it is VALUEX.
VALUEX is simply the number of pipes contained in one of the attributes.
The objective is that I loop as many times as the maximum number of pipes that exist.
Then my method may not be the right one 😕
The maximum number of pipes is 324 and the objective is that I break the values into several attributes to find them in a single value.
What I would like to achieve:
(Knowing that X is the only value I have at the start)
X | VALUEX | SEPARATE1 | SEPARATE2 | SEPARATE3 | SEPARATE4 | SEPARATE5 |
DATA | DATA1 | BIG DATA | BIG | FARM | 4 | DATA | DATA1 | BIG DATA | BIG | FARM |
I could run the loop 324 times, but if there are at most 10 pipes, I will create 314 empty attributes...
So you have X and ValueX
and you want to split X into multiple columns is that correct?
Completely
temp:
Load X as Key, subfield(X,'|') as Value ,'Seperate'&rowno() as Attribute Inline [
X,VALUEX
DATA | DATA1 | BIG DATA | BIG | FARM , 4
];
Generic:
Generic Load
Key,Attribute,Value Resident temp;
Set vListOfTables = ;
For vTableNo = 0 to NoOfTables()
Let vTableName = TableName($(vTableNo)) ;
If Subfield(vTableName,'.',1)='Generic' Then
Let vListOfTables = vListOfTables & If(Len(vListOfTables)>0,',') & Chr(39) & vTableName & Chr(39) ;
End If
Next vTableNo;
CombinedGenericTable:
Load distinct Key Resident temp;
For each vTableName in $(vListOfTables)
Left Join (CombinedGenericTable) Load * Resident [$(vTableName)];
Drop Table temp;
Next vTableName