Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ritvik4BI
Partner - Contributor III
Partner - Contributor III

How to apply KEEP on a Cross table

Hi everyone,

I am stuck here and need some help on this.

I have two tables Table1 and Table2 and I am trying to apply a LEFT KEEP keeping in mind that I want to keep the complete Table1 and only the common fields in Table2.  But the thing is that Table2 is a cross table. So when I apply keep before Table2, it throws me an error. The thing is I cant even take resident or make a qvd of Table2 because Table2 has tens of thousands of columns and that puts unnecessary load on my server. So how to go about things here?

The script I am using is something like this: 

Table1:
LOAD MachineID,
TagID,
TagName
FROM
[Scenario.xlsx]
(ooxml, embedded labels, table is Sheet1);

left keep
Table2:
CrossTable(TagName, Data)
LOAD timestamp,
Alpha,
Beta,
Gamma,
x,
y,
z
FROM
[Scenario.xlsx]
(ooxml, embedded labels, table is Sheet2);

exit script;

Note: Table2 has tens of thousands of columns so aplha,beta, gamma, x,y and z are just an example hence I can not take a resident or make a qvd because of too much load on the server. And I want the complete Table1 and only the common columns from Table2 like alpha,beta and gamma in this case. So is there any way via which I can apply KEEP with CrossTable?

Thanks and Regards.

 

 

1 Reply
edwin
Master II
Master II

you cant apparently CANT apply a keep and a cross at the same time.  you may have to create a 3rd table:

 

table1:.....
table2: crosstable .....

noconctenate Table3: left keep (table1) load * table2;
drop table table2;