Skip to content

fix: table cache invalidation - #12

Merged
agupta-meltano merged 1 commit into
mainfrom
fix_table_cache_invalidation
Jul 15, 2026
Merged

fix: table cache invalidation#12
agupta-meltano merged 1 commit into
mainfrom
fix_table_cache_invalidation

Conversation

@agupta-meltano

@agupta-meltano agupta-meltano commented Jul 15, 2026

Copy link
Copy Markdown

The existing table_cache.pop clears the wrong layer: get_table_columns reads through a long-lived cached Inspector, and snowflake-sqlalchemy memoises columns per schema on it, so a table created after that schema was first reflected stays invisible and raises NoSuchTableError. Adding SnowflakeConnector.invalidate_table_cache(), which pops the table_cache entry and sets _inspector = None so reflection re-queries Snowflake, and routes SnowflakeSink.setup() two table_cache.pop calls through it fixes sqlalchemy.exc.NoSuchTableError: ().

@agupta-meltano agupta-meltano self-assigned this Jul 15, 2026
@agupta-meltano agupta-meltano added the bug Something isn't working label Jul 15, 2026
@ReubenFrankel

Copy link
Copy Markdown

Related to MeltanoLabs#389

@agupta-meltano
agupta-meltano merged commit e4a1dc3 into main Jul 15, 2026
@agupta-meltano
agupta-meltano deleted the fix_table_cache_invalidation branch July 15, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants