Skip to content

Instantly share code, notes, and snippets.

@kvnkho
Last active February 11, 2022 04:20
Show Gist options
  • Save kvnkho/375b8e8eb046db62a004e8cce053d756 to your computer and use it in GitHub Desktop.
Save kvnkho/375b8e8eb046db62a004e8cce053d756 to your computer and use it in GitHub Desktop.
from fugue import transform
from pyspark.sql import SparkSession
spark_session = SparkSession.builder.getOrCreate()
df = transform(input_df,
map_letter_to_food,
schema="*, food:str",
params=dict(mapping=mapping),
engine=spark_session
)
df.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment