MCPcopy Create free account
hub / github.com/baidu/bigflow / take

Function take

bigflow_python/python/bigflow/transforms.py:956–983  ·  view source on GitHub ↗

取给定PCollection中的任意n个元素。 (如果总元素数量不足n,则返回输入pcollection) Args: pcollection (PCollection): 输入PCollection n (int or PObject): 元素数量 **options: 可配置参数 Returns: PCollection: 表示结果的PCollection >>> from bigflow import transforms >>> _p = _pipeline.parallel

(pcollection, n, **options)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

takeMethod · 0.80

Tested by

no test coverage detected