@df.ptransform_fn
def SamplePTransform(label, pcoll, context, *args, **kwargs):
  _ = label, args, kwargs
  map_transform = df.Map('ToPairs', lambda v: (v, None))
  combine_transform = df.CombinePerKey('Group', lambda vs: None)
  keys_transform = df.Keys('RemoveDuplicates')
  context.extend([map_transform, combine_transform, keys_transform])
  return pcoll | map_transform | combine_transform | keys_transform
Sample transform using the @ptransform_fn decorator.
dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/transforms/ptransform_test.py/SamplePTransform