CARTO Sources
Sources provide data sources for CARTO layer types, and are based on deck.gl data sources.
Reference
Vector sources
- class vector_table_source(**kwargs: ~typing_extensions.)
Defines a table as a data source for one or more vector layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
table_name (str) – Fully-qualified name of table.
spatial_data_column (str, optional) – Name of spatial data column. Common examples are “geom”, “h3”, or “quadbin”.
columns (List[str], optional) – List of table columns to be loaded.
- class vector_query_source(**kwargs: ~typing_extensions.)
Defines a query as a data source for one or more vector layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str, optional) – Access token, see Authentication.
api_base_url (str) – API base URL, see Authentication.
sql_query (str) – SQL query.
query_parameters (List[str], optional) – List of positional SQL parameters.
spatial_data_column (str, optional) – Name of spatial data column. Common examples are “geom”, “h3”, or “quadbin”.
columns (List[str], optional) – List of table columns to be loaded.
- class vector_tileset_source(**kwargs: ~typing_extensions.)
Defines a tileset as a data source for one or more vector layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
table_name (str) – Fully-qualified name of table.
H3 sources
- class h3_table_source(**kwargs: ~typing_extensions.)
Defines a table as a data source for one or more H3 layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
table_name (str) – Fully-qualified name of table.
spatial_data_column (str, optional) – Name of spatial data column. Common examples are “geom”, “h3”, or “quadbin”.
aggregation_exp (str, optional) – Aggregation SQL expression. Only used for spatial index datasets.
aggregation_res_level (int, optional) – Aggregation resolution level. Only used for spatial index datasets, defaults to 6 for quadbins, 4 for h3.
- class h3_query_source(**kwargs: ~typing_extensions.)
Defines a query as a data source for one or more H3 layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
sql_query (str) – SQL query.
query_parameters (List[str], optional) – List of positional SQL parameters.
spatial_data_column (str, optional) – Name of spatial data column. Common examples are “geom”, “h3”, or “quadbin”.
aggregation_exp (str) – Aggregation SQL expression. Only used for spatial index datasets.
aggregation_res_level (int, optional) – Aggregation resolution level. Only used for spatial index datasets, defaults to 6 for quadbins, 4 for h3.
- class h3_tileset_source(**kwargs: ~typing_extensions.)
Defines a tileset as a data source for one or more H3 layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
table_name (str) – Fully-qualified name of table.
Quadbin sources
- class quadbin_table_source(**kwargs: ~typing_extensions.)
Defines a table as a data source for one or more quadbin layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
table_name (str) – Fully-qualified name of table.
spatial_data_column (str, optional) – Name of spatial data column. Common examples are “geom”, “h3”, or “quadbin”.
aggregation_exp (str) – Aggregation SQL expression. Only used for spatial index datasets.
aggregation_res_level (int, optional) – Aggregation resolution level. Only used for spatial index datasets, defaults to 6 for quadbins, 4 for h3.
- class quadbin_query_source(**kwargs: ~typing_extensions.)
Defines a query as a data source for one or more quadbin layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
sql_query (str) – SQL query.
query_parameters (List[str], optional) – List of positional SQL parameters.
spatial_data_column (str, optional) – Name of spatial data column. Common examples are “geom”, “h3”, or “quadbin”.
aggregation_exp (str) – Aggregation SQL expression. Only used for spatial index datasets.
aggregation_res_level (int, optional) – Aggregation resolution level. Only used for spatial index datasets, defaults to 6 for quadbins, 4 for h3.
- class quadbin_tileset_source(**kwargs: ~typing_extensions.)
Defines a tileset as a data source for one or more quadbin layers.
- Parameters:
connection_name (str) – Name of the connection registered in the CARTO Workspace. CARTO Data Warehouse connection name is “carto_dw”.
access_token (str) – Access token, see Authentication.
api_base_url (str, optional) – API base URL, see Authentication.
table_name (str) – Fully-qualified name of table.