boundaryTableSource
You can use boundaryTableSource to build layers and widgets using a combination of:
- Properties: A table in your data warehouse that contains points. 
- Boundaries: A pre-generated tileset in your data warehouse that contains the polygon boundaries that will be used to aggregate the properties. 
Learn more about building highly-performant large-scale boundaries visualization in our using Boundaries guide for developers.
Usage
import {boundaryTableSource} from '@carto/api-client';
const data = boundaryTableSource({
  accessToken: 'XXX',
  connectionName: 'carto_dw',
  tilesetTableName: 'carto-data.my_tilesets.zipcodes_boundaries',
  propertiesTableName: 'carto-demo-data.demo_tables.data_points'
});Options
type BoundaryTableSourceOptions = {
  tilesetTableName: string;
  propertiesTableName: string;
  columns?: string[];
  filters?: Filters;
  filtersLogicalOperator?: 'and' | 'or'; 
};- tilesetTableName: The fully qualified name (FQN) of the table that will contain the polygon-based boundaries in your visualization. For example, for a BigQuery connection, - carto-data.my_tilesets.zipcodes_boundarieswould be a valid boundaries table name.
- propertiesTableName: The fully qualified name (FQN) of the table that will contain the point-based properties in your visualization. For example, for a BigQuery connection, - carto-data.my_tables.data_pointswould be a valid properties table name.
- columns (optional): The list of columns to retrieve from the table specified in - propertiesTableName. Useful to increase performance and optimize query costs in tables with a large number of columns. By default, all columns will be retrieved.
- filters (optional): A valid CARTO Filters object, used to perform server-side filtering of this data source with column-based filters. 
- filtersLogicalOperator (optional): Indicates whether - filtersare applied following an- ANDlogic or an- ORlogic.
Response
The response of boundaryTableSource is a promise that can be resolved and used in layers.
Connection compatibility
Layer compatibility
boundaryTableSource is compatible with the following layers from the @deck.gl/carto module:
Widget model compatibility
boundaryTableSource is not compatible with widgets.
A recommended workaround is to use a vectorTableSource using the same properties, attached to the widgets. The same filters can then be attached to both your vector source and your boundary source.
Last updated
Was this helpful?
