Skip to content

Commit

Permalink
docs(carto): add maxLengthURL, remove mapsUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed Sep 20, 2024
1 parent 0c89a92 commit 0e55cdb
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions docs/api-reference/carto/data-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {vectorTableSource} from '@deck.gl/carto';
const data = vectorTableSource({
accessToken: 'XXX',
connectionName: 'carto_dw',
tableName: 'carto-demo-data.demo_tables.chicago_crime_sample',
})
tableName: 'carto-demo-data.demo_tables.chicago_crime_sample'
});
```

### Promise API
Expand Down Expand Up @@ -51,7 +51,7 @@ type SourceOptions = {
apiBaseUrl?: string;
clientId?: string;
headers?: Record<string, string>;
mapsUrl?: string;
maxLengthURL?: number;
};
```

Expand All @@ -64,7 +64,7 @@ type VectorTableSourceOptions = {
columns?: string[];
spatialDataColumn?: string;
tableName: string;
}
};
```

#### vectorQuerySource
Expand All @@ -74,15 +74,15 @@ type VectorQuerySourceOptions = {
spatialDataColumn?: string;
sqlQuery: string;
queryParameters: QueryParameters;
}
};
```

#### vectorTilesetSource

```ts
type VectorTilesetSourceOptions = {
tableName: string;
}
};
```

#### h3TableSource
Expand All @@ -94,7 +94,7 @@ type H3TableSourceOptions = {
columns?: string[];
spatialDataColumn?: string;
tableName: string;
}
};
```

#### h3QuerySource
Expand All @@ -106,15 +106,15 @@ type H3QuerySourceOptions = {
spatialDataColumn?: string;
sqlQuery: string;
queryParameters: QueryParameters;
}
};
```

#### h3TilesetSource

```ts
type H3TilesetSourceOptions = {
tableName: string;
}
};
```

#### quadbinTableSource
Expand All @@ -126,7 +126,7 @@ type QuadbinTableSourceOptions = {
columns?: string[];
spatialDataColumn?: string;
tableName: string;
}
};
```

#### quadbinQuerySource
Expand All @@ -138,23 +138,23 @@ type QuadbinQuerySourceOptions = {
spatialDataColumn?: string;
sqlQuery: string;
queryParameters: QueryParameters;
}
};
```

#### quadbinTilesetSource

```ts
type QuadbinTilesetSourceOptions = {
tableName: string;
}
};
```

#### rasterTilesetSource (Experimental)

```ts
type RasterTilesetSourceOptions = {
tableName: string;
}
};
```

Boundary sources are experimental sources where both the tileset and the properties props need a specific schema to work. [Read more about Boundaries in the CARTO documentation](https://docs.carto.com/carto-for-developers/guides/use-boundaries-in-your-application).
Expand All @@ -166,7 +166,7 @@ type BoundaryTableSourceOptions = {
tilesetTableName: string;
columns?: string[];
propertiesTableName: string;
}
};
```

#### boundaryQuerySource (Experimental)
Expand All @@ -176,14 +176,15 @@ type BoundaryQuerySourceOptions = {
tilesetTableName: string;
propertiesSqlQuery: string;
queryParameters?: QueryParameters;
}
};
```

### QueryParameters

QueryParameters are used to parametrize SQL queries. The format depends on the source's provider, some examples:

[PostgreSQL and Redshift](https://node-postgres.com/features/queries):

```ts
vectorQuerySource({
...,
Expand All @@ -193,6 +194,7 @@ vectorQuerySource({
```

[BigQuery positional](https://cloud.google.com/bigquery/docs/parameterized-queries#node.js):

```ts
vectorQuerySource({
...,
Expand All @@ -201,8 +203,8 @@ vectorQuerySource({
})
```

[BigQuery named parameters](https://cloud.google.com/bigquery/docs/parameterized-queries#node.js):

```ts
vectorQuerySource({
...,
Expand All @@ -212,6 +214,7 @@ vectorQuerySource({
```

[Snowflake positional](https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html#binding-statement-parameters) :

```ts
vectorQuerySource({
...,
Expand All @@ -230,6 +233,7 @@ vectorQuerySource({
```

[Databricks ODBC](https://github.com/markdirish/node-odbc#bindparameters-callback)

```ts
vectorQuerySource({
...
Expand Down

0 comments on commit 0e55cdb

Please sign in to comment.