1

I have used the following script to generate the Cartesian product of two vectors: the columns “order_book_ids” and “trading_dates” from two tables.

ordt=table(order_book_ids as id)
datet=table(trading_dates as dts)
tb=select id, dts from cj(ordt, datet)
list=()
for (i in 0..(size(tb)-1)){
    list.append!(tb[i].values())}
list

enter image description here

molddd123
  • 297
  • 6

1 Answers1

0

The cross function is a better choice. You can try the script below:

flatten cross(def(x,y)->(x,y), 1 2 3, `A`B`C)

or

flatten cross(join, 1 2 3, `A`B`C)
lulunolemon
  • 219
  • 3