Executes a SQL statement which can be any of
SELECT
SHOW
DESCRIBE
Request
HTTP request
GET https://www.googleapis.com/fusiontables/v2/query
Parameters
Parameter name | Value | Description |
---|---|---|
Required query parameters | ||
sql |
string |
A SQL statement which can be any of
|
Optional query parameters | ||
hdrs |
boolean |
Whether column names are included (in the first row). Default is true .
|
typed |
boolean |
Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed geometries for KML values. Default is true .
|
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response body with the following structure:
JSON
{ "kind": "fusiontables#sqlresponse", "columns": [ string ], "rows": [ [ double, long, string, { "geometry": { "type": "Point", "coordinates": [ double, double, double ] }, "geometry": { "type": "LineString", "coordinates": [ [ double, double, double ] ] }, "geometry": { "type": "Polygon", "coordinates": [ [ [ double, double, double ] ], [ [ double, double, double ] ] ] }, "type": "GeometryCollection", "geometries": [ { "type": "Point", "coordinates": [ double, double, double ] }, { "type": "LineString", "coordinates": [ [ double, double, double ] ] }, { "type": "Polygon", "coordinates": [ [ [ double, double, double ] ], [ [ double, double, double ] ] ] } ] } ] ] }
Property name | Value | Description | Notes |
---|---|---|---|
kind |
string |
The kind of item this is. For responses to sqlGet queries, this is always fusiontables#sqlresponse . |
|
columns[] |
list |
Columns in the table. | |
rows[] |
list |
The rows in the table. For each cell we print out whatever cell value (e.g., numeric, string) exists. Thus it is important that each cell contains only one value. | |
rows[].geometry |
nested object |
A polygon geometry. | |
rows[].geometry.type |
string |
Type: A polygon geometry. | |
rows[].geometry.coordinates[] |
list |
The coordinates that define the polygon. | |
rows[].type |
string |
Type: A collection of geometries. | |
rows[].geometries[] |
list |
The list of geometries in this geometry collection. | |
rows[].geometries[].type |
string |
Type: A polygon geometry. | |
rows[].geometries[].coordinates[] |
list |
The coordinates that define the polygon. |
CSV
"(dynamic)" (foreach) double, string (/foreach)
Property name | Value | Description | Notes |
---|---|---|---|
(dynamic) |
(value) |
Try it!
Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.