-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatched Keys: Update read_dlt_delta() with key "source_database" instead of "database" #33
Conversation
onboard_dataflowspec.py sets key "source_database" when creating bronze dataflow spec dataframe inside source details. However read_dlt_delta tries to read "database" instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please fix Unit Tests |
@@ -62,14 +62,14 @@ def read_dlt_delta(spark, bronze_dataflow_spec) -> DataFrame: | |||
if reader_config_options and len(reader_config_options) > 0: | |||
return ( | |||
spark.readStream.options(**reader_config_options).table( | |||
f"""{bronze_dataflow_spec.sourceDetails["database"]} | |||
f"""{bronze_dataflow_spec.sourceDetails["source_database"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we introduce a variable, say source_table
for the value and use it in these two places (so it's clear(er) that they're the same)? 🙏
Can this be resolved please? |
fixed unit tests for changing keys in delta pipeline reader
merged this for v0.0.7 release. |
@prabhat-ratnala this is fixed in release v.0.0.7 |
Issue:
When the bronze_dataflow_spec dataframe is created in
onboard_dataflowspec.py
, the database is included with keysource_database
in thesourceDetails
field. However, inpipeline_readers.py
>read_dlt_delta()
, it is accessed with keydatabase
instead.Fix:
Change the key to
source_database
inpipeline_readers.py
>read_dlt_delta()
.