最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google cloud firestore - Firebase - Unable to join collections using document_id using BigQuery - Stack Overflow

programmeradmin3浏览0评论

I'm using Firestore and have installed the BigQuery extension. I'm having trouble joining two tables/collections using the document_id? This is working as expected if I use other columns for the join, i'm just having trouble using the document_id.

SELECT 
    JSON_EXTRACT(foo.data, '$.name') AS user_name,
    JSON_EXTRACT(bar.data, '$.name') AS company_name
FROM `foo_table` AS foo
LEFT JOIN `bar_table` AS bar
ON CAST(JSON_EXTRACT(foo.data, '$.bar') AS STRING) = bar.document_id;
发布评论

评论列表(0)

  1. 暂无评论