Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Simple example of converting tuples to a map

View tupletomap.py
1 2 3 4 5 6 7 8 9 10 11
@outputSchema("output:map[]")
def tupleToMap(inputs):
field_names = ["field1", "field2", "field3"]
result = {}
if len(field_names) == len(inputs):
for i in range(len(inputs)):
result[field_names[i]] = inputs[i]
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.