metadata_imports
Creates, updates, deletes, gets or lists a metadata_imports resource.
Overview
| Name | metadata_imports |
| Type | Resource |
| Id | google.metastore.metadata_imports |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Identifier. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}. |
createTime | string (google-datetime) | Output only. The time when the metadata import was started. |
databaseDump | object | Immutable. A database dump from a pre-existing metastore's database. (id: DatabaseDump) |
description | string | Optional. The description of the metadata import. |
endTime | string (google-datetime) | Output only. The time when the metadata import finished. |
state | string | Output only. The current state of the metadata import. (STATE_UNSPECIFIED, RUNNING, SUCCEEDED, UPDATING, FAILED) |
updateTime | string (google-datetime) | Output only. The time when the metadata import was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Identifier. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}. |
createTime | string (google-datetime) | Output only. The time when the metadata import was started. |
databaseDump | object | Immutable. A database dump from a pre-existing metastore's database. (id: DatabaseDump) |
description | string | Optional. The description of the metadata import. |
endTime | string (google-datetime) | Output only. The time when the metadata import finished. |
state | string | Output only. The current state of the metadata import. (STATE_UNSPECIFIED, RUNNING, SUCCEEDED, UPDATING, FAILED) |
updateTime | string (google-datetime) | Output only. The time when the metadata import was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, servicesId, metadataImportsId | Gets details of a single import. | |
list | select | projectsId, locationsId, servicesId | orderBy, pageSize, filter, pageToken | Lists imports in a service. |
create | insert | projectsId, locationsId, servicesId | requestId, metadataImportId | Creates a new MetadataImport in a given project and location. |
patch | update | projectsId, locationsId, servicesId, metadataImportsId | requestId, updateMask | Updates a single import. Only the description field of MetadataImport is supported to be updated. |
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 |
|---|---|---|
locationsId | string | |
metadataImportsId | string | |
projectsId | string | |
servicesId | string | |
filter | string | |
metadataImportId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single import.
SELECT
name,
createTime,
databaseDump,
description,
endTime,
state,
updateTime
FROM google.metastore.metadata_imports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND servicesId = '{{ servicesId }}' -- required
AND metadataImportsId = '{{ metadataImportsId }}' -- required
;
Lists imports in a service.
SELECT
name,
createTime,
databaseDump,
description,
endTime,
state,
updateTime
FROM google.metastore.metadata_imports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND servicesId = '{{ servicesId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new MetadataImport in a given project and location.
INSERT INTO google.metastore.metadata_imports (
data__description,
data__databaseDump,
data__name,
projectsId,
locationsId,
servicesId,
requestId,
metadataImportId
)
SELECT
'{{ description }}',
'{{ databaseDump }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ servicesId }}',
'{{ requestId }}',
'{{ metadataImportId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: metadata_imports
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the metadata_imports resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the metadata_imports resource.
- name: servicesId
value: "{{ servicesId }}"
description: Required parameter for the metadata_imports resource.
- name: description
value: "{{ description }}"
description: |
Optional. The description of the metadata import.
- name: databaseDump
description: |
Immutable. A database dump from a pre-existing metastore's database.
value:
databaseType: "{{ databaseType }}"
type: "{{ type }}"
sourceDatabase: "{{ sourceDatabase }}"
gcsUri: "{{ gcsUri }}"
- name: name
value: "{{ name }}"
description: |
Immutable. Identifier. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.
- name: requestId
value: "{{ requestId }}"
- name: metadataImportId
value: "{{ metadataImportId }}"
UPDATE examples
- patch
Updates a single import. Only the description field of MetadataImport is supported to be updated.
UPDATE google.metastore.metadata_imports
SET
data__description = '{{ description }}',
data__databaseDump = '{{ databaseDump }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND servicesId = '{{ servicesId }}' --required
AND metadataImportsId = '{{ metadataImportsId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;