"""Snowflake connector class for Membran tasks.""" from snowflake_connector.etl_connector import SQLLoader from feed_ingestion.common.staging_raw_sf.base_executor import \ SnowflakeSQLExecutorSR from feed_ingestion.flows.physical_warehouse_reports import config # Load SQL templates sql_loader = SQLLoader(__file__) class PhysicalWarehouseReportsSF(SnowflakeSQLExecutorSR): """Helper class to abstract Snowflake operations.""" @property def feed_name(self): """Name of the feed. Should match dir name of this feed, feed_name in config.py of a feed, and a key of executors dict in feed_ingestion/common/ fact_analytics_sf/__init__.py file. Returns: str: Feed name, e.g. 'amazon_unlimited'. """ return config.feed_name @property def staging_raw_table(self): """Name of the staging_raw table for the feed. Returns: str: staging_raw_{feed} table name. """ return config.snowflake_table_names['staging_raw']