如何使用 Google 自然语言 API 丰富 Bigquery table 中的数据?

How can I use Google Natural Language API to enrich data in a Bigquery table?

我想使用存储在 BigQuery table 中的数据作为 Google's Natural Language API 的输入,执行实体提取和情感分析,并将结果保存回 BigQuery。在 GCP 中我可以使用什么 tools/services 来处理这个问题?性能不是问题,运行 对于这个用例,table 可以接受 table 隔夜批处理。

这对于 Dataflow 来说应该相当简单——您可以编写一个 reads from BigQuery followed by a DoFn that uses Google's NLP Libraries, and then writes the results to BigQuery.

的管道

https://github.com/apache/beam/blob/master/sdks/python/apache_beam/ml/gcp/naturallanguageml.py

中已经为您提供了一些包装器