snowshu.adapters.source_adapters.base_source_adapter

class snowshu.adapters.source_adapters.base_source_adapter.BaseSourceAdapter(preserve_case: bool = False)

Bases: snowshu.adapters.base_sql_adapter.BaseSQLAdapter

MAX_ALLOWED_DATABASES = 2000
MAX_ALLOWED_ROWS = 1000000
SUPPORTED_FUNCTIONS = {}
SUPPORTS_CROSS_DATABASE = False
check_count_and_query(query: str, max_count: int, unsampled: bool) → pandas.core.frame.DataFrame

checks the count, if count passes returns results as a dataframe.

name = ''
scalar_query(query: str) → Any

Returns only a single value.

When the database is expected to return a single row with a single column, this method will return the raw value from that cell. Will throw a TooManyRecords exception.

Parameters

query – the query to execute.

Returns

the raw value from cell [0][0]