How to get a cartesian product between two datasets?

UserBird
Dataiker
How to get a cartesian product between two datasets?
 
0 Kudos
1 Reply
jrouquie
Dataiker Alumni

I see a few options to do so:




  • use a sql recipe like this: SELECT ... FROM foo JOIN bar ON 1 = 1

  • create a column in each dataset (called "key" for example) and with a constant value (1 for example). A visual JOIN recipe, joining on this column "key", will do the trick.

  • this is also doable in a Python or R recipe.





As always with cartesian product, estimate the size of the output dataset before building it.

0 Kudos

Labels

?
Labels (1)
A banner prompting to get Dataiku