Looks like you need to choose a subclass of sample. Probably FixedSizeGlobally in your case. For example,
beam.transforms.combiners.*Sample.FixedSizeGlobally(5)* Source: https://github.com/apache/beam/blob/df376164fee1a8f54f3ad00c45190b813ffbdd34/sdks/python/apache_beam/transforms/combiners.py#L619 On Tue, Dec 17, 2019 at 2:01 PM Marco Mistroni <mmistr...@gmail.com> wrote: > HI all > beam noob. > > i have written a beam app where i am processing content of a file > for dbeugging purposes, i wanted to get a samle of the lines in the > file..using > the Sample combiner, but i cannot find any examples in python > Here's my rough code > > ... > | 'Filter only row longer than 100 chars' >> beam.Filter(lambda row: len(row) > > 100) > | 'sampling lines' >> beam.transforms.combiners.Sample() > > but the code above gives me > > TypeError: unsupported operand type(s) for >>: 'str' and 'Sample' > Could anyone help? > kind regards > Marco > > > >