Iterate over rows

Thanks for the response.
I want to calculate a SNP by SNP (row by row) correlation coefficient between 2 datasets. Meaning applying some correlation function (e.g. Pearson’s) to the vector of genotype dosage from hail table 1 and the vector of the same SNP from ht2, and generate a SNP genotype correlation matrix.

I know annotate, but could was not able to apply a function that will take 2 vectors from 2 different tables. I also found a build in correlation function but it also only takes the rows from only one ht, and is more of a LD calculation function.

Thanks,
Or