Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cartesian product

Hi, how can I do to obtain a cartesian product between two oracle tables?I use tMap component. Thank you.
Labels (2)
21 Replies
Anonymous
Not applicable
Author

Do you have some idea about the release plan ?
When version 2.0.1 will be released?
Thank you
Anonymous
Not applicable
Author

So, if I understand well, you would like to use a standalone component with a free field for typing your query such as
INSERT MyTable (MyColumn1, MyColumn2, MyColumn3, MyColumn4) (SELECT * FROM MyTable1, MyTable2)
Is it right ?
With Talend 2.0.0 you can execute this query in tOracleRow but you must connect a fake start component before to send one row, then the query will be executed.
With Talend 2.0.1 (not released yet) you will be able to use the tOracleRow alone.

Yes J, to be more precise:
select SELECT1.A,SELECT2.B
from (select * from TABLE1) select1, (select * from TABLE2 where C='kk') select2
but select1 end select2 are the output of two distinct components!So, my problem is to find a graphic component where I can select ?A? and ?B? and to use the output to other component, like tMap!
I?d like to see a similar graphic:
---------------
| select1 |
--------------
| --------------
----------------->| cartesian |--------> ?.. other graphic....
----------------->| product |
| | and select |
| | A and B |
| --------------
---------------
| select2 |
----.----------
Is it possible? What do you think about?
amaumont
Contributor III
Contributor III

The example on picture should fulfil your problem.
What do you think ?
Anonymous
Not applicable
Author

The example on picture should fulfil your problem.
What do you think ?

Thanks a lot for your graphic and for you suggestion J
Yes, that you have done is that I?d like to do, but I can?t because I haven?t ?table1? and ?table2?! L I have two big distinct graphics created in Talend or two big distinct ?select?.
Well :
1. how can I write my two ?select? in your tETLOracleInput_1 and tETLOracleInput_2?
or
2. how can I connect my two distinct graphics to your tELTOracleInput_1 and tETLOracleInput_2?
I know that:
1. If I use tMap component then I can write my two big distinct ?select? into two tOracleInput, but I can?t obtain the ?cross Join? o ?cartesian product?
2. If I use tELTOracleMap I can make a ?cross Join? but I can?t connect anything to the tELTOracleMap or I can connect tETLOracleInput but I can?t write my select because is not allowed.
Is it true?
tnx
Anonymous
Not applicable
Author

I have a doubt : do you really want a cartesian product between your 2 inputs ?
In a cartesian product, if your first input has X rows and your second input has Y rows, the output resulting from the cartesian product will have X*Y rows.
Anonymous
Not applicable
Author

I have a doubt : do you really want a cartesian product between your 2 inputs ?
In a cartesian product, if your first input has X rows and your second input has Y rows, the output resulting from the cartesian product will have X*Y rows.

yes Smiley Happy I want
Anonymous
Not applicable
Author

OK, the best way to do it is to load your 2 inputs in 2 Oracle tables and then use ELT components the way amaumont explained in his last post.
Anonymous
Not applicable
Author

OK, the best way to do it is to load your 2 inputs in 2 Oracle tables and then use ELT components the way amaumont explained in his last post.

Thanks for your solution. Smiley Happy
You said:
? best way to do it is to load your 2 inputs in 2 Oracle tables? --> 1 STEP
and
?then use ELT components? --> 2 STEP
Then I have:
1. I used two tOracleInput and two tOracleOutput for write my selects into tables --> STEP 1
2. I used two tELTOracleInput and 1 tELTMap for the ?cross join? --> STEP 2
Result:
The result of the tELTOracleOutput is incorrect because STEP1 and STEP2 are non synchronized and they start together!!!
How can I resolve this problem? Smiley Sad
amaumont
Contributor III
Contributor III

Ok, I see your problem.
The solution I propose is not the better solution because a bug prevents to connect correctly a third RunBefore from tOracleInput to tELTOracleMap. Even it is possible, it implies a compilation error. I created a bug report on this subject 1077.
So an alternative solution should be to use a tRunJob to start ELT processing like in the image.
Anonymous
Not applicable
Author

Ok, I see your problem.
The solution I propose is not the better solution because a bug prevents to connect correctly a third RunBefore from tOracleInput to tELTOracleMap. Even it is possible, it implies a compilation error. I created a bug report on this subject 1077.
So an alternative solution should be to use a tRunJob to start ELT processing like in the image.

Thanks for your solution. It runs. Smiley Happy I hope the problem bug 1077 will be quickly resolved!
However the best solution should be to put a ?cross join? in the tMap component, because if I use ELT component, I must insert the result of tELTOracleMap into table before using it.
Why is the ?cross join? possible only in tELtOracleMap and not in the tMap?
Thanks a lot Smiley Happy Smiley Happy Smiley Happy