Skip to content

Commit

Permalink
fix 2 review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Mar 5, 2024
1 parent 09475dc commit 22485f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions dlt/common/storages/live_schema_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ def is_live_schema_committed(self, name: str) -> bool:
raise SchemaNotFoundError(name, f"live-schema://{name}")
try:
stored_schema_json = self._load_schema_json(name)
return live_schema.stored_version_hash == cast(
str, stored_schema_json.get("version_hash")
)
return live_schema.version_hash == cast(str, stored_schema_json.get("version_hash"))
except FileNotFoundError:
return False

Expand Down
3 changes: 2 additions & 1 deletion dlt/extract/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def choose_schema() -> Schema:
"""Except of explicitly passed schema, use a clone that will get discarded if extraction fails"""
if schema:
schema_ = schema
# if we have a default schema name, use it but do not collect any info from the existing schema
# TODO: We should start with a new schema of the same name here ideally, but many tests fail
# because of this. So some investigation is needed.
elif pipeline.default_schema_name:
schema_ = pipeline.schemas[pipeline.default_schema_name].clone()
else:
Expand Down

0 comments on commit 22485f6

Please sign in to comment.