fix: resolve physicalName for slaProperties freshness/retention checks - #1522
Open
aabf wants to merge 1 commit into
Open
fix: resolve physicalName for slaProperties freshness/retention checks#1522aabf wants to merge 1 commit into
aabf wants to merge 1 commit into
Conversation
Freshness/retention CheckSpec.model was built from the raw sla.element model segment, while schema checks already resolve through to_schema_name() (physicalName fallback). Whenever a schema object's name differs from its physicalName, the servicelevel check failed at execution with "Could not read model" because it targeted the logical name instead of the real table.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_freshness_check/_retention_checkincreate_checks.pybuiltCheckSpec.modelfrom the rawsla.elementmodel segment, while schema checks already resolve throughto_schema_name()(physicalName fallback).namediffers from itsphysicalName, the servicelevel check failed at execution time withCould not read model '<name>', since the ibis engine resolves tables byphysicalName.to_schema_name(schema_object, server_type).This addresses suggestion 1 from the Slack thread repro (split out from suggestion 2, nested-field
elementsupport, per Jakob's request to keep the two independent).Test plan
tests/test_create_checks_servicelevel.pycovering physicalName resolution and fallback-to-name for both freshness and retention checkspytest tests/test_create_checks_servicelevel.py tests/test_create_checks_sql_placeholders.py tests/test_create_checks_nested_type.py tests/test_create_checks_primary_key.py tests/test_create_checks_physical_type.py tests/test_test_dimension_filter.py tests/test_test_metadata_only.py— 83 passedruff check/ruff format --checkclean