Google cloud platform 在ApacheBeam中编写内部连接的最佳有效方法是什么?
假设我的查询是:“从Google cloud platform 在ApacheBeam中编写内部连接的最佳有效方法是什么?,google-cloud-platform,google-cloud-dataflow,apache-beam,Google Cloud Platform,Google Cloud Dataflow,Apache Beam,假设我的查询是:“从sourav_test.test1a内部连接sourav_test.test2b on a.id=b.id中选择b.*”。我需要apache beam的最佳和高效的方法来编写这篇文章。在apache beam SDK 2.5中,一个很好的方法是使用执行类似SQL的连接的。对于内部联接,语法如下所示: innerJoin(PCollection<KV<K,V1>> leftCollection,PCollection<KV<K,V2>&
sourav_test.test1
a内部连接sourav_test.test2
b on a.id=b.id中选择b.*”。我需要apache beam的最佳和高效的方法来编写这篇文章。在apache beam SDK 2.5中,一个很好的方法是使用执行类似SQL的连接的。对于内部联接,语法如下所示:
innerJoin(PCollection<KV<K,V1>> leftCollection,PCollection<KV<K,V2>> rightCollection)
innerJoin(PCollection leftCollection,PCollection rightCollection)
与您的案例相关,左侧集合和侧面集合表示要内部连接的集合。K值将是与这两个集合相关的键的类型。Vs将分别表示每个集合的值 如果您的输入数据源恰好是BigQuery,那么在将其拉入beam/dataflow之前在BigQuery中执行连接可能会更有效。