【发布时间】:2020-07-04 08:50:25
【问题描述】:
我有两个数组,一个用于我要更新的值,一个用于 where 语句。 这是用户名列表:
[
'4feathersandfur', '4flyman',
'4iisx', '4lergico_',
'4mygal', '4mygal',
'4mygal', '4mygal',
'4mygal', '4mygal',
'4mygal', '4ringzryan',
'4summeror4ever', '5.by',
'5.by', '5.by',
'5.by', '5.by',
'5.vt', '5.vt',
'5.vt', '5.vt',
'5.vt', '5.vt',
'5.vt', '5.vt',
'501_f', '502_nesha',
'5050_therealvito', '50_shades_of_dramatic',
'50_shades_of_dramatic', '50tonsdesono_',
'526ha', '5588fatima',
'5588fatima', '559ac',
'55sommy55', '55sommy55',
'58_q8', '5_alsheh7i.94'
]
这是 new_ig_followers_count 的列表
[
'1001', '1000', '1001', '1000',
'1000', '1000', '1000', '1000',
'1000', '1000', '1000', '1001',
'1001', '1000', '1000', '1000',
'1000', '1000', '1001', '1001',
'1001', '1001', '1001', '1001',
'1001', '1001', '1000', '1000',
'1001', '1001', '1001', '1001',
'1001', '1001', '1001', '1000',
'1001', '1001', '1000', '1001'
]
我想要一个工作来更新所有具有这些用户名的行及其相应的关注者计数是否可以在单个工作中完成。
表的架构是
Field name Type Mode Description
username STRING NULLABLE
website STRING NULLABLE
description STRING NULLABLE
url STRING NULLABLE
followed_by INTEGER NULLABLE
email STRING NULLABLE
new_ig_followers_count INTEGER NULLABLE
updated_at TIMESTAMP NULLABLE
IG_alive BOOLEAN NULLABLE
【问题讨论】:
-
请澄清这与 BigQuery 的关系 - 现在是 BQ 表吗?表的场景和预期的结果是什么。注意:BigQuery 和 mySql 是完全不同的引擎,所以只留下您的问题所涉及的标签并删除另一个
-
是的,我想在 bigquery 表中更新它。预期的结果是我想更新表中用户名对应的所有关注者计数列值
-
不清楚你的表的架构和输出的架构 - 请提供两者的清晰示例
-
表的模式是
Field name Type Mode Description\n username STRING NULLABLE \n website STRING NULLABLE \n description STRING NULLABLE\n url STRING NULLABLE \n followed_by INTEGER NULLABLE \n email STRING NULLABLE \n new_ig_followers_count INTEGER NULLABLE \n updated_at TIMESTAMP NULLABLE \n IG_alive BOOLEAN NULLABLE\n -
请用所有细节更新您的问题 - cmets 格式不允许以可读方式显示所有需要的信息
标签: node.js google-bigquery gcloud