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