class Tables extends Resource (View source)

The "tables" collection of methods.

Typical usage is:

 $bigqueryService = new Google\Service\Bigquery(...);
 $tables = $bigqueryService->tables;

Methods

delete(string $projectId, string $datasetId, string $tableId, array $optParams = [])

Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. (tables.delete)

get(string $projectId, string $datasetId, string $tableId, array $optParams = [])

Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. (tables.get)

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (tables.getIamPolicy)

insert(string $projectId, string $datasetId, Table $postBody, array $optParams = [])

Creates a new, empty table in the dataset. (tables.insert)

listTables(string $projectId, string $datasetId, array $optParams = [])

Lists all tables in the specified dataset. Requires the READER dataset role.

patch(string $projectId, string $datasetId, string $tableId, Table $postBody, array $optParams = [])

Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports RFC5789 patch semantics. (tables.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (tables.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

update(string $projectId, string $datasetId, string $tableId, Table $postBody, array $optParams = [])

Updates information in an existing table. The update method replaces the entire Table resource, whereas the patch method only replaces fields that are provided in the submitted Table resource. (tables.update)

Details

delete(string $projectId, string $datasetId, string $tableId, array $optParams = [])

Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. (tables.delete)

Parameters

string $projectId

Required. Project ID of the table to delete

string $datasetId

Required. Dataset ID of the table to delete

string $tableId

Required. Table ID of the table to delete

array $optParams

Optional parameters.

Exceptions

Exception

Table get(string $projectId, string $datasetId, string $tableId, array $optParams = [])

Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. (tables.get)

Parameters

string $projectId

Required. Project ID of the requested table

string $datasetId

Required. Dataset ID of the requested table

string $tableId

Required. Table ID of the requested table

array $optParams

Optional parameters.

Return Value

Table

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (tables.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Table insert(string $projectId, string $datasetId, Table $postBody, array $optParams = [])

Creates a new, empty table in the dataset. (tables.insert)

Parameters

string $projectId

Required. Project ID of the new table

string $datasetId

Required. Dataset ID of the new table

Table $postBody
array $optParams

Optional parameters.

Return Value

Table

Exceptions

Exception

TableList listTables(string $projectId, string $datasetId, array $optParams = [])

Lists all tables in the specified dataset. Requires the READER dataset role.

(tables.listTables)

Parameters

string $projectId

Required. Project ID of the tables to list

string $datasetId

Required. Dataset ID of the tables to list

array $optParams

Optional parameters.

Return Value

TableList

Exceptions

Exception

Table patch(string $projectId, string $datasetId, string $tableId, Table $postBody, array $optParams = [])

Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports RFC5789 patch semantics. (tables.patch)

Parameters

string $projectId

Required. Project ID of the table to update

string $datasetId

Required. Dataset ID of the table to update

string $tableId

Required. Table ID of the table to update

Table $postBody
array $optParams

Optional parameters.

Return Value

Table

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (tables.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (tables.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception

Table update(string $projectId, string $datasetId, string $tableId, Table $postBody, array $optParams = [])

Updates information in an existing table. The update method replaces the entire Table resource, whereas the patch method only replaces fields that are provided in the submitted Table resource. (tables.update)

Parameters

string $projectId

Required. Project ID of the table to update

string $datasetId

Required. Dataset ID of the table to update

string $tableId

Required. Table ID of the table to update

Table $postBody
array $optParams

Optional parameters.

Return Value

Table

Exceptions

Exception