metadata_imports
Creates, updates, deletes, gets or lists a metadata_imports
resource.
Overview
Name | metadata_imports |
Type | Resource |
Id | google.metastore.metadata_imports |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}. |
description | string | The description of the metadata import. |
createTime | string | Output only. The time when the metadata import was started. |
databaseDump | object | A specification of the location of and metadata about a database dump from a relational database management system. |
endTime | string | Output only. The time when the metadata import finished. |
state | string | Output only. The current state of the metadata import. |
updateTime | string | Output only. The time when the metadata import was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, metadataImportsId, projectsId, servicesId | Gets details of a single import. |
list | SELECT | locationsId, projectsId, servicesId | Lists imports in a service. |
create | INSERT | locationsId, projectsId, servicesId | Creates a new MetadataImport in a given project and location. |
patch | UPDATE | locationsId, metadataImportsId, projectsId, servicesId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.metastore.metadata_imports (
locationsId,
projectsId,
servicesId,
databaseDump,
name,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ servicesId }}',
'{{ databaseDump }}',
'{{ name }}',
'{{ description }}'
;
- name: your_resource_model_name
props:
- name: databaseDump
value:
- name: databaseType
value: string
- name: gcsUri
value: string
- name: sourceDatabase
value: string
- name: type
value: string
- name: name
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: endTime
value: string
- name: state
value: string
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 }}';