# Interface QueryTableDataSourceJson

Query table data source is a layer/table that is defined by a SQL query. See https://developers.arcgis.com/web-map-specification/objects/queryTableDataSource/ https://developers.arcgis.com/web-scene-specification/objects/queryTableDataSource/.

interface QueryTableDataSourceJson {
geometryType?:
| "esriGeometryPoint"
| "esriGeometryMultipoint"
| "esriGeometryPolyline"
| "esriGeometryPolygon";
oidFields?: string;
query?: string;
spatialReference?: SpatialReferenceJson;
type: "queryTable";
workspaceId?: string;
}

#### Hierarchy (view full)

- DataSourceJsonBase
  - QueryTableDataSourceJson

#####
Index

### Properties

geometryType?
oidFields?
query?
spatialReference?
type
workspaceId?

##
Properties

### `Optional` geometryType

geometryType?:
| "esriGeometryPoint"
| "esriGeometryMultipoint"
| "esriGeometryPolyline"
| "esriGeometryPolygon"

The geometry type. When querying a table that does not have a geometry column, do not include geometryType.

### `Optional` oidFields

oidFields?: string

Comma separated list of identifier fields. There are only certain field types that can be used as a unique identifier. These field types include integer, string, GUID, and date. If a single integer field is specified, map server uses the values in that field directly to uniquely identify all features and rows returned from a queryTable. However, if a single string field or a group of fields is used as the unique identifier, map server maps those unique values to an integer.

### `Optional` query

query?: string

The SQL query.

### `Optional` spatialReference

spatialReference?: SpatialReferenceJson

The spatial reference of the geometry column. When querying a table that does not have a geometry column, do not include spatialReference.

### type

type

Type of the DataSource.

Overrides DataSourceJsonBase.type

### `Optional` workspaceId

workspaceId?: string

The unique string value used to identify the data-source's workspace.

Inherited from DataSourceJsonBase.workspaceId