federations
Creates, updates, deletes, gets or lists a federations
resource.
Overview
Name | federations |
Type | Resource |
Id | google.metastore.federations |
Fields
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 | 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. |
stateMessage | string | Output only. Additional information about the current state of the metastore federation, if available. |
uid | string | Output only. The globally unique resource identifier of the metastore federation. |
updateTime | string | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | federationsId, locationsId, projectsId | Gets the details of a single federation. |
list | SELECT | locationsId, projectsId | Lists federations in a project and location. |
create | INSERT | locationsId, projectsId | Creates a metastore federation in a project and location. |
delete | DELETE | federationsId, locationsId, projectsId | Deletes a single federation. |
patch | UPDATE | federationsId, locationsId, projectsId | Updates the fields of a federation. |
SELECT
examples
Lists federations in a project and location.
SELECT
name,
backendMetastores,
createTime,
endpointUri,
labels,
state,
stateMessage,
uid,
updateTime,
version
FROM google.metastore.federations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new federations
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.metastore.federations (
locationsId,
projectsId,
name,
labels,
version,
backendMetastores
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ version }}',
'{{ backendMetastores }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: version
value: string
- name: backendMetastores
value: object
- name: endpointUri
value: string
- name: state
value: string
- name: stateMessage
value: string
- name: uid
value: string
UPDATE
example
Updates a federations
resource.
/*+ update */
UPDATE google.metastore.federations
SET
name = '{{ name }}',
labels = '{{ labels }}',
version = '{{ version }}',
backendMetastores = '{{ backendMetastores }}'
WHERE
federationsId = '{{ federationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified federations
resource.
/*+ delete */
DELETE FROM google.metastore.federations
WHERE federationsId = '{{ federationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';