Generic sql_solid for executing SQL against Delta Table with Spark #3148
sspaeti
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I successfully integrated a solid that can MERGE against a Delta Table passing a Spark DataFrame as input (thanks to the Airline Demo example).
This looks something like this (code below):
As I'm seeking feedback and or points where things were done wrong, I also wanted to share some code around Delta Lake.
Some specific questions that came up while developing:
target_delta_table
andinput_dataframe
as fixed parameters insql_solid
. I decided not so I can dynamically ingest these inputs during the pipeline and not hardcoded in themerge_example
-solid. Should I change that to avoid errors during runtime?if input_defs['target_delta_table'] is None
although this is wrong as this itself raises the error if input_def is not defined. I wanted to check theinput_defs
already inside thesql_solid
, but I wasn't able to catch these two input parameters as this is not a real solid.Dagster Code
Types
sql_solid function which returns the solid
My merge solid
Beta Was this translation helpful? Give feedback.
All reactions