Skip to main content

tabledata

Creates, updates, deletes, gets or lists a tabledata resource.

Overview

Nametabledata
TypeResource
Idgoogle.bigquery.tabledata

Fields

NameDatatypeDescription
etagstringA hash of this page of results.
kindstringThe resource type of the response.
pageTokenstringA token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing.
rowsarrayRows of results.
totalRowsstringTotal rows of the entire table. In order to show default value 0 we have to present it as string.

Methods

NameAccessible byRequired ParamsDescription
listSELECT+datasetId, +tableId, projectIdList the content of a table in rows.
insert_allINSERT+datasetId, +tableId, projectIdStreams data into BigQuery one record at a time without needing to run a load job.

SELECT examples

List the content of a table in rows.

SELECT
etag,
kind,
pageToken,
rows,
totalRows
FROM google.bigquery.tabledata
WHERE +datasetId = '{{ +datasetId }}'
AND +tableId = '{{ +tableId }}'
AND projectId = '{{ projectId }}';

INSERT example

Use the following StackQL query and manifest file to create a new tabledata resource.

/*+ create */
INSERT INTO google.bigquery.tabledata (
+datasetId,
+tableId,
projectId,
ignoreUnknownValues,
rows,
skipInvalidRows,
templateSuffix,
traceId
)
SELECT
'{{ +datasetId }}',
'{{ +tableId }}',
'{{ projectId }}',
{{ ignoreUnknownValues }},
'{{ rows }}',
{{ skipInvalidRows }},
'{{ templateSuffix }}',
'{{ traceId }}'
;