Skip to content

Commit

Permalink
[embedded-elt][sling] Correctly get an object_key when a stream has a…
Browse files Browse the repository at this point in the history
…n empty config (#26797)

## Summary & Motivation
This fixes an issue where Sling materialisations fail if a stream has an
empty config.

A fix for #25515 and #25925

Original code by @Westm7

## How I Tested These Changes
I had a failing config, which no longer fails after this change.

Co-authored-by: Westm7 <[email protected]>
  • Loading branch information
Cogito and Westm7 authored Jan 6, 2025
1 parent 151d6a9 commit 35ca60c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _replicate(
for stream in stream_definitions:
asset_key = dagster_sling_translator.get_asset_key(stream)

object_key = stream.get("config", {}).get("object")
object_key = (stream.get("config") or {}).get("object")
destination_stream_name = object_key or stream["name"]
table_name = None
if destination_name and destination_stream_name:
Expand Down

0 comments on commit 35ca60c

Please sign in to comment.