federations
Creates, updates, deletes, gets or lists a federations resource.
Overview
| Name | federations |
| Type | Resource |
| Id | google.metastore.federations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`. |
backendMetastores | object | A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number. |
createTime | string (google-datetime) | Output only. The time when the metastore federation was created. |
endpointUri | string | Output only. The federation endpoint. |
labels | object | User-defined labels for the metastore federation. |
state | string | Output only. The current state of the federation. (STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, ERROR) |
stateMessage | string | Output only. Additional information about the current state of the metastore federation, if available. |
tags | object | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
uid | string | Output only. The globally unique resource identifier of the metastore federation. |
updateTime | string (google-datetime) | Output only. The time when the metastore federation was last updated. |
version | string | Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`. |
backendMetastores | object | A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number. |
createTime | string (google-datetime) | Output only. The time when the metastore federation was created. |
endpointUri | string | Output only. The federation endpoint. |
labels | object | User-defined labels for the metastore federation. |
state | string | Output only. The current state of the federation. (STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, ERROR) |
stateMessage | string | Output only. Additional information about the current state of the metastore federation, if available. |
tags | object | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
uid | string | Output only. The globally unique resource identifier of the metastore federation. |
updateTime | string (google-datetime) | Output only. The time when the metastore federation was last updated. |
version | string | Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, federationsId | Gets the details of a single federation. | |
list | select | projectsId, locationsId | orderBy, pageToken, pageSize, filter | Lists federations in a project and location. |
create | insert | projectsId, locationsId | requestId, federationId | Creates a metastore federation in a project and location. |
patch | update | projectsId, locationsId, federationsId | updateMask, requestId | Updates the fields of a federation. |
delete | delete | projectsId, locationsId, federationsId | requestId | Deletes a single federation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
federationsId | string | |
locationsId | string | |
projectsId | string | |
federationId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets the details of a single federation.
SELECT
name,
backendMetastores,
createTime,
endpointUri,
labels,
state,
stateMessage,
tags,
uid,
updateTime,
version
FROM google.metastore.federations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND federationsId = '{{ federationsId }}' -- required
;
Lists federations in a project and location.
SELECT
name,
backendMetastores,
createTime,
endpointUri,
labels,
state,
stateMessage,
tags,
uid,
updateTime,
version
FROM google.metastore.federations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a metastore federation in a project and location.
INSERT INTO google.metastore.federations (
data__tags,
data__labels,
data__version,
data__name,
data__backendMetastores,
projectsId,
locationsId,
requestId,
federationId
)
SELECT
'{{ tags }}',
'{{ labels }}',
'{{ version }}',
'{{ name }}',
'{{ backendMetastores }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ federationId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: federations
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the federations resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the federations resource.
- name: tags
value: "{{ tags }}"
description: |
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
- name: labels
value: "{{ labels }}"
description: |
User-defined labels for the metastore federation.
- name: version
value: "{{ version }}"
description: |
Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.
- name: name
value: "{{ name }}"
description: |
Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- name: backendMetastores
value: "{{ backendMetastores }}"
description: |
A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
- name: requestId
value: "{{ requestId }}"
- name: federationId
value: "{{ federationId }}"
UPDATE examples
- patch
Updates the fields of a federation.
UPDATE google.metastore.federations
SET
data__tags = '{{ tags }}',
data__labels = '{{ labels }}',
data__version = '{{ version }}',
data__name = '{{ name }}',
data__backendMetastores = '{{ backendMetastores }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND federationsId = '{{ federationsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single federation.
DELETE FROM google.metastore.federations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND federationsId = '{{ federationsId }}' --required
AND requestId = '{{ requestId }}'
;