metadata_jobs
Creates, updates, deletes, gets or lists a metadata_jobs
resource.
Overview
Name | metadata_jobs |
Type | Resource |
Id | google.dataplex.metadata_jobs |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_metadata_jobs_get
- projects_locations_metadata_jobs_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}. |
createTime | string (google-datetime) | Output only. The time when the metadata job was created. |
exportResult | object | Output only. Export job result. (id: GoogleCloudDataplexV1MetadataJobExportJobResult) |
exportSpec | object | Export job specification. (id: GoogleCloudDataplexV1MetadataJobExportJobSpec) |
importResult | object | Output only. Import job result. (id: GoogleCloudDataplexV1MetadataJobImportJobResult) |
importSpec | object | Import job specification. (id: GoogleCloudDataplexV1MetadataJobImportJobSpec) |
labels | object | Optional. User-defined labels. |
status | object | Output only. Metadata job status. (id: GoogleCloudDataplexV1MetadataJobStatus) |
type | string | Required. Metadata job type. |
uid | string | Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different. |
updateTime | string (google-datetime) | Output only. The time when the metadata job was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}. |
createTime | string (google-datetime) | Output only. The time when the metadata job was created. |
exportResult | object | Output only. Export job result. (id: GoogleCloudDataplexV1MetadataJobExportJobResult) |
exportSpec | object | Export job specification. (id: GoogleCloudDataplexV1MetadataJobExportJobSpec) |
importResult | object | Output only. Import job result. (id: GoogleCloudDataplexV1MetadataJobImportJobResult) |
importSpec | object | Import job specification. (id: GoogleCloudDataplexV1MetadataJobImportJobSpec) |
labels | object | Optional. User-defined labels. |
status | object | Output only. Metadata job status. (id: GoogleCloudDataplexV1MetadataJobStatus) |
type | string | Required. Metadata job type. |
uid | string | Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different. |
updateTime | string (google-datetime) | Output only. The time when the metadata job was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_metadata_jobs_get | select | projectsId , locationsId , metadataJobsId | Gets a metadata job. | |
projects_locations_metadata_jobs_list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists metadata jobs. |
projects_locations_metadata_jobs_create | insert | projectsId , locationsId | metadataJobId , validateOnly | Creates a metadata job. For example, use a metadata job to import metadata from a third-party system into Dataplex Universal Catalog. |
projects_locations_metadata_jobs_cancel | exec | projectsId , locationsId , metadataJobsId | Cancels a metadata job.If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job. |
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 | |
metadataJobsId | string | |
projectsId | string | |
filter | string | |
metadataJobId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
validateOnly | boolean |
SELECT
examples
- projects_locations_metadata_jobs_get
- projects_locations_metadata_jobs_list
Gets a metadata job.
SELECT
name,
createTime,
exportResult,
exportSpec,
importResult,
importSpec,
labels,
status,
type,
uid,
updateTime
FROM google.dataplex.metadata_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND metadataJobsId = '{{ metadataJobsId }}' -- required;
Lists metadata jobs.
SELECT
name,
createTime,
exportResult,
exportSpec,
importResult,
importSpec,
labels,
status,
type,
uid,
updateTime
FROM google.dataplex.metadata_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- projects_locations_metadata_jobs_create
- Manifest
Creates a metadata job. For example, use a metadata job to import metadata from a third-party system into Dataplex Universal Catalog.
INSERT INTO google.dataplex.metadata_jobs (
data__labels,
data__type,
data__importSpec,
data__exportSpec,
projectsId,
locationsId,
metadataJobId,
validateOnly
)
SELECT
'{{ labels }}',
'{{ type }}',
'{{ importSpec }}',
'{{ exportSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ metadataJobId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: metadata_jobs
props:
- name: projectsId
value: string
description: Required parameter for the metadata_jobs resource.
- name: locationsId
value: string
description: Required parameter for the metadata_jobs resource.
- name: labels
value: object
description: >
Optional. User-defined labels.
- name: type
value: string
description: >
Required. Metadata job type.
valid_values: ['TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT']
- name: importSpec
value: object
description: >
Import job specification.
- name: exportSpec
value: object
description: >
Export job specification.
- name: metadataJobId
value: string
- name: validateOnly
value: boolean
Lifecycle Methods
- projects_locations_metadata_jobs_cancel
Cancels a metadata job.If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.
EXEC google.dataplex.metadata_jobs.projects_locations_metadata_jobs_cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@metadataJobsId='{{ metadataJobsId }}' --required;