擅长:python、mysql、java
<p>对于更有效的侧输入(中小尺寸),您可以利用
<code>
beam.pvalue.AsList(mappingTable)
</code>
由于<code>AsList</code>导致Beam具体化数据,所以您肯定会得到该pcollection的内存列表。在</p>
<blockquote>
<p>Intended for use in side-argument specification -the same places
where AsSingleton and AsIter are used, but forces materialization of
this PCollection as a list.</p>
<p>Source: <a href="https://beam.apache.org/documentation/sdks/pydoc/2.2.0/apache_beam.pvalue.html?highlight=aslist#apache_beam.pvalue.AsList" rel="nofollow noreferrer">https://beam.apache.org/documentation/sdks/pydoc/2.2.0/apache_beam.pvalue.html?highlight=aslist#apache_beam.pvalue.AsList</a></p>
</blockquote>