Skip to main content

metadata_imports

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

Overview

Namemetadata_imports
TypeResource
Idgoogle.metastore.metadata_imports

Fields

NameDatatypeDescription
namestringImmutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.
descriptionstringThe description of the metadata import.
createTimestringOutput only. The time when the metadata import was started.
databaseDumpobjectA specification of the location of and metadata about a database dump from a relational database management system.
endTimestringOutput only. The time when the metadata import finished.
statestringOutput only. The current state of the metadata import.
updateTimestringOutput only. The time when the metadata import was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, metadataImportsId, projectsId, servicesIdGets details of a single import.
listSELECTlocationsId, projectsId, servicesIdLists imports in a service.
createINSERTlocationsId, projectsId, servicesIdCreates a new MetadataImport in a given project and location.
patchUPDATElocationsId, metadataImportsId, projectsId, servicesIdUpdates a single import. Only the description field of MetadataImport is supported to be updated.

SELECT examples

Lists imports in a service.

SELECT
name,
description,
createTime,
databaseDump,
endTime,
state,
updateTime
FROM google.metastore.metadata_imports
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND servicesId = '{{ servicesId }}';

INSERT example

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

/*+ create */
INSERT INTO google.metastore.metadata_imports (
locationsId,
projectsId,
servicesId,
databaseDump,
name,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ servicesId }}',
'{{ databaseDump }}',
'{{ name }}',
'{{ description }}'
;

UPDATE example

Updates a metadata_imports resource.

/*+ update */
UPDATE google.metastore.metadata_imports
SET
databaseDump = '{{ databaseDump }}',
name = '{{ name }}',
description = '{{ description }}'
WHERE
locationsId = '{{ locationsId }}'
AND metadataImportsId = '{{ metadataImportsId }}'
AND projectsId = '{{ projectsId }}'
AND servicesId = '{{ servicesId }}';