【发布时间】:2020-05-22 09:18:46
【问题描述】:
我有一个 bigquery 表,我想将它与公共数据集 bigquery-public-data.crypto_bitcoin.transactions 进行外部联接。由于事务表有两个嵌套字段输入和输出。 join 的结果也有嵌套值。我想删除那些。
SELECT *
FROM `asymmetric-glow-274808.mydataset.txid` as mytable
LEFT JOIN `bigquery-public-data.crypto_bitcoin.transactions` as datasource
ON mytable.string_field_3 = datasource.hash
LIMIT 1
例子
mytable
txid
1
transactions
hash inputs.index inputs.type outputs.index outputs.type
1 0 aaa 0 aaa
1 bbb 1 bbb
After join im getting
txid hash inputs.index inputs.type outputs.index outputs.type
1 1 0 aaa 0 aaa
1 bbb 1 bbb
what i want
txid hash inputs.index inputs.type outputs.index outputs.type
1 1 0 aaa 0 aaa
1 1 1 bbb 1 bbb
怎么做?
【问题讨论】:
标签: google-bigquery