From 3a3d1b2ebdd4520a5f181c37d768ec277d5580a0 Mon Sep 17 00:00:00 2001 From: Ford Date: Thu, 11 Dec 2025 12:36:43 -0800 Subject: [PATCH 1/2] snowflake loader: fix stream state store config, allow setting its own --- src/amp/loaders/implementations/snowflake_loader.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/amp/loaders/implementations/snowflake_loader.py b/src/amp/loaders/implementations/snowflake_loader.py index 6737c73..a390ed6 100644 --- a/src/amp/loaders/implementations/snowflake_loader.py +++ b/src/amp/loaders/implementations/snowflake_loader.py @@ -831,13 +831,10 @@ def connect(self) -> None: self._create_stage() # Replace in-memory state store with Snowflake-backed store if configured - state_config = getattr(self.config, 'state', None) - if state_config: - storage = getattr(state_config, 'storage', None) - enabled = getattr(state_config, 'enabled', True) - if storage == 'snowflake' and enabled: - self.logger.info('Using Snowflake-backed persistent state store') - self.state_store = SnowflakeStreamStateStore(self.connection, self.cursor, self.logger) + # Base class already parsed state config and stored it in self.state_storage and self.state_enabled + if self.state_storage == 'snowflake' and self.state_enabled: + self.logger.info('Using Snowflake-backed persistent state store') + self.state_store = SnowflakeStreamStateStore(self.connection, self.cursor, self.logger) # Otherwise, state store is initialized in base class with in-memory storage (default) self._is_connected = True From 7f9b201e987bfb146e8d95d4f7b5eab3307c8f54 Mon Sep 17 00:00:00 2001 From: Ford Date: Thu, 11 Dec 2025 12:37:12 -0800 Subject: [PATCH 2/2] logging: suppress acero alignment warnings --- src/amp/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/amp/__init__.py b/src/amp/__init__.py index dbba4c5..3d2f7c8 100644 --- a/src/amp/__init__.py +++ b/src/amp/__init__.py @@ -1,5 +1,12 @@ """Amp - Flight SQL client with comprehensive data loading capabilities.""" +import os + +# Suppress PyArrow acero alignment warnings before any imports +# These warnings are informational and cannot be controlled via logging +# Valid values: ignore, warn, reallocate, error +os.environ.setdefault('ACERO_ALIGNMENT_HANDLING', 'ignore') + from amp.client import Client, QueryBuilder from amp.registry import RegistryClient