cross join with tMap

One Star yk
One Star

cross join with tMap

does anyone know if there are any ways to cross join with tMap?
thanks
One Star

Re: cross join with tMap

Yes, pull in the three tables that you are going to use ( T1, T1T2, T2 ).
Map each of them as inputs to the tMap
In the tmap take the key from T1 and map it to the T1 key in T1T2 and click the inner join box on the T1T2 table inside of the tMap.
No take the T2 key from T1T2 and map it to the T2 table and select the inner join checkbox on the T2 table inside of the tMap
Now you have a cross join.
One Star yk
One Star

Re: cross join with tMap

thank you very much, spyro!!
it is working perfect!!

Re: cross join with tMap

Hi all
still following the naming Spyro used before, I was trying to do a cross join starting from just T1 and T2, i.e. I do not have a T1T2 to use as input.
So I have something like
T1
1
2
3
T2
a
b
the desired output should be
T3
1;a
1;b
2;a
2;b
3;a
3;b
I tried with tMap without any link between T1 and T2, but it does not seem to work. Any suggestion?
Thanks for your time
Giuseppe
One Star Lie
One Star

Re: cross join with tMap

Hi,
That works fine with me. A tMap without any link between T1 and T2 does the result you expect for.
Could you post some pictures of your job ?

Regards,
Lie

Re: cross join with tMap

Thanks for your feedback, Lie.
You were right. That was enough.
There was another sort of problem, that I did not noticed at all:
because of some stupid links I put, there was actually no process going on. I.e. no statistics were showing on connection lines, like: no 'ok', no 'xx rows in yy s". Non output from tLogRow. Console output was just:
Starting job GetCompaniesAndYearsToComputeFromDS1 at 15:38 03/06/2010.
connecting to socket on port 3633
connected
disconnected
Job GetCompaniesAndYearsToComputeFromDS1 ended at 15:38 03/06/2010.
I'll post the screenshots just as possible help for anyone else.
The mistake I did was the following: there were two MsSqlInput in the same subjob, both using an existing common connection, and both of them wired up to the MsSqlConnection by means of an 'OnSubJobOk' link. (See second attached image, Job Wrong)
For some reason I did not explore yet, this was causing the job to run without any apparent data flow being processed.
By removing one of the two 'OnSubJobOk' links, everything was fine again. I.e. tMap output (correct), statistics on wires, tLogRow output, etc. (See first attached image, Job Right).
Giuseppe