quadbinTableSource

You can use quadbinTableSource to build layers and widgets using tables in your data warehouse that contain:

Usage

import {quadbinTableSource} from '@carto/api-client';

const data = quadbinTableSource({
  accessToken: 'XXX',
  connectionName: 'carto_dw',
  tableName: 'carto-demo-data.demo_tables.quadbin_table',
  aggregationExp: 'SUM(population)'
});

Options

type QuadbinTableSourceOptions = {
  tableName: string;
  aggregationExp: string;
  aggregationResLevel?: number;
  spatialDataColumn?: string;
  filters?: Filters;
  filtersLogicalOperator?: 'and' | 'or'; 
};
  • tableName: The fully qualified name (FQN) of the table you want to retrieve from your data warehouse. For example, for a BigQuery connection, carto-demo-data.demo_tables.quadbin_sample would be a valid table name.

  • aggregationExp: A valid SQL expression that will define how this source aggregates quadbin cells starting from the base resolution into each parent quadbin cell in lower zoom levels. For example, for an aggregationExp containing AVG(income) , each parent quadbin cell will contain the average income from all its children.

    • For point-based, this defines the aggregation of the points for every zoom level.

  • aggregationResLevel (optional): A number that expresses the resolution detail that will be used for each zoom level. By default this value is 6 .

    • Numbers lower than 6 will produce a less detailed visualization, with better performance.

    • Numbers higher than 6 will product a more detailed visualization, with worse performance.

  • spatialDataColumn (optional): The name of the column that contains the geospatial information (geometries/geographies) that will be used for visualization and etc. By default, CARTO assumes this column is named geom.

  • 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 filters are applied following an AND logic or an OR logic.

Response

The response of quadbinTableSource is a promise that can be resolved and used in layers and widgets.

Connection compatibility

Connection Data Warehouse
Compatible

Layer compatibility

quadbinTableSource is compatible with the following layers from the @deck.gl/carto module:

Widget model compatibility

quadbinTableSource is compatible with the following widget models:

Last updated

Was this helpful?