Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mkiran_18
Contributor III
Contributor III

Removing Cartesian product while loading data

Hi All,

Currently we have data as per below screenshot.

Source_data.JPG

Could you please help me on how to convert the data as per below screenshot:

Current Output in table box:

Current_output.JPG

 

Required Output:

Required Output.JPG

Please find the attached excel file and qvw for reference.

Thanks

Labels (1)
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

You can add another preceding load to achieve your goal like this:

TABLE1:
LOAD
  ID, FIELD_1_NEW, FIELD_2_NEW
WHERE
  FIELD_1_NEW = FIELD_2_NEW;
LOAD *,
  SubField(FIELD_1,chr(10)) as FIELD_1_NEW,
  SubField(FIELD_2,chr(10)) as FIELD_2_NEW;
LOAD ID,

  FIELD_1,
  FIELD_2
FROM
  [Cartesian_sample.xlsx]
  (ooxml, embedded labels, table is Sheet1);

 

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

You can add another preceding load to achieve your goal like this:

TABLE1:
LOAD
  ID, FIELD_1_NEW, FIELD_2_NEW
WHERE
  FIELD_1_NEW = FIELD_2_NEW;
LOAD *,
  SubField(FIELD_1,chr(10)) as FIELD_1_NEW,
  SubField(FIELD_2,chr(10)) as FIELD_2_NEW;
LOAD ID,

  FIELD_1,
  FIELD_2
FROM
  [Cartesian_sample.xlsx]
  (ooxml, embedded labels, table is Sheet1);

 

mkiran_18
Contributor III
Contributor III
Author

Hi Petter,

Thanks for your help.