Created
August 23, 2023 03:54
-
-
Save elijahbenizzy/c242ff65442d7584bfaaa07447da5b6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hamilton.plugins.h_spark import with_columns | |
import pyspark.sql as ps | |
import map_transforms # file defined above | |
@with_columns( | |
map_transforms, | |
columns_to_pass=["column_1_from_dataframe", "column_2_from_dataframe"] | |
) | |
def final_result(all_initial_data: ps.DataFrame) -> ps.DataFrame: | |
"""Gives the final result. This decorator will apply the transformations in the order specified in the DAG. | |
Then, the final_result function is called, with the result of the transformations passed in.""" | |
return _process(all_initial_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment