Skip to main content

federations

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

Overview

Namefederations
TypeResource
Idgoogle.metastore.federations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
backendMetastoresobjectA 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.
createTimestring (google-datetime)Output only. The time when the metastore federation was created.
endpointUristringOutput only. The federation endpoint.
labelsobjectUser-defined labels for the metastore federation.
statestringOutput only. The current state of the federation. (STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING, ERROR)
stateMessagestringOutput only. Additional information about the current state of the metastore federation, if available.
tagsobjectOptional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
uidstringOutput only. The globally unique resource identifier of the metastore federation.
updateTimestring (google-datetime)Output only. The time when the metastore federation was last updated.
versionstringImmutable. 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, federationsIdGets the details of a single federation.
listselectprojectsId, locationsIdorderBy, pageToken, pageSize, filterLists federations in a project and location.
createinsertprojectsId, locationsIdrequestId, federationIdCreates a metastore federation in a project and location.
patchupdateprojectsId, locationsId, federationsIdupdateMask, requestIdUpdates the fields of a federation.
deletedeleteprojectsId, locationsId, federationsIdrequestIdDeletes 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.

NameDatatypeDescription
federationsIdstring
locationsIdstring
projectsIdstring
federationIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Deletes a single federation.

DELETE FROM google.metastore.federations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND federationsId = '{{ federationsId }}' --required
AND requestId = '{{ requestId }}'
;