Skip to content

Instantly share code, notes, and snippets.

@brunoripa
Created January 29, 2018 16:21
Show Gist options
  • Save brunoripa/0bbb8829a0942ba0a0bed9b0c5c60251 to your computer and use it in GitHub Desktop.
Save brunoripa/0bbb8829a0942ba0a0bed9b0c5c60251 to your computer and use it in GitHub Desktop.

class Split(apache_beam.DoFn):

def process(self, element):
    country, duration, user = element.split(",")

    return [{
        'country': country,
        'duration': float(duration),
        'user': user
    }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment