snowflake
- nomad.io.snowflake.get_table_head(snow_engine, table_name, n_rows=5)[source]
get the first rows of a sql table as a pandas dataframe
- nomad.io.snowflake.table_column_filtered(snow_engine, table_name, column, value)[source]
Get the dataframe from an SQL table where a specific column equals a certain value.
- nomad.io.snowflake.table_column_unique(snow_engine, table_name, column)[source]
Get the list of unique values from a specific column in an SQL table.
- nomad.io.snowflake.table_columns(snow_engine, table_name, include_schema=False)[source]
Either return the column names or, if include_schema is True, the full table schema.
- Parameters:
snow_engine (sqlalchemy.engine.Engine) – A live Snowflake engine.
table_name (str) – The (optionally database- and schema-qualified) table name.
include_schema (bool, default False) – When False (default) the function returns the column names; when True it returns the result of DESCRIBE TABLE, i.e. the schema.
- Returns:
Column names as a pandas Index (or list) or, if requested, a DataFrame with the schema.
- Return type:
pandas.Index | list[str] | pandas.DataFrame