geodesic.boson.dataset.Dataset.from_snowflake_table#
- static Dataset.from_snowflake_table(name, account, database, table, credential, schema='public', warehouse=None, id_column=None, geometry_column=None, datetime_column=None, feature_limit=8000, middleware={}, cache={}, tile_options={}, domain='*', category='*', type='*', **kwargs)[source]#
Create a
Datasetfrom a Snowflake table.This method creates a new
Datasetfrom an existing Snowflake table.- Parameters:
name (str) – name of the
Datasetaccount (str) – Snowflake account string, formatted as
<orgname>-<account_name>. Ref url:https – //docs.snowflake.com/en/user-guide/admin-account-identifier#using-an-account-name-as-an-identifier
database (str) – Snowflake database that contains the table
table (str) – name of the Snowflake table
credential (str) – name of a credential to access table. Either basic auth or oauth2 refresh token are supported
schema (str) – Snowflake schema the table resides in
warehouse (str | None) – name of the Snowflake warehouse to use
id_column (str | None) – name of the column containing a unique identifier. Integer IDs preferred, but not required
geometry_column (str | None) – name of the column containing the primary geometry for spatial filtering.
datetime_column (str | None) – name of the column containing the primary datetime field for temporal filtering.
feature_limit (int) – max number of results to return in a single page from a search
middleware (MiddlewareConfig | list) – configure any boson middleware to be applied to the new dataset.
cache (CacheConfig) – configure caching for this dataset
tile_options (TileOptions) – configure tile options for this dataset
domain (str) – domain of the resulting
Objectcategory (str) – category of the resulting
Objecttype (str) – the type of the resulting
Object**kwargs (dict) – additional properties to set on the new
Dataset
- Returns:
a new
Dataset- Return type:
Example
>>> snowflake = geodesic.Dataset.from_snowflake_table( ... name="ais", ... account="<Your-snowflake-account>", ... database="GEODESIC", ... table="AIS_DATA", ... schema="PUBLIC", ... id_column="id", ... geometry_column="geometry", ... datetime_column="datetime", ... credential="snowflake" ... ) >>> snowflake.stage() >>> # Staging is optional, but is a useful tool for validating configuration >>> snowflake.save()