Skip to main content

metadata_jobs

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

Overview

Namemetadata_jobs
TypeResource
Idgoogle.dataplex.metadata_jobs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput 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}.
createTimestring (google-datetime)Output only. The time when the metadata job was created.
exportResultobjectOutput only. Export job result. (id: GoogleCloudDataplexV1MetadataJobExportJobResult)
exportSpecobjectExport job specification. (id: GoogleCloudDataplexV1MetadataJobExportJobSpec)
importResultobjectOutput only. Import job result. (id: GoogleCloudDataplexV1MetadataJobImportJobResult)
importSpecobjectImport job specification. (id: GoogleCloudDataplexV1MetadataJobImportJobSpec)
labelsobjectOptional. User-defined labels.
statusobjectOutput only. Metadata job status. (id: GoogleCloudDataplexV1MetadataJobStatus)
typestringRequired. Metadata job type.
uidstringOutput 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.
updateTimestring (google-datetime)Output only. The time when the metadata job was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_metadata_jobs_getselectprojectsId, locationsId, metadataJobsIdGets a metadata job.
projects_locations_metadata_jobs_listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists metadata jobs.
projects_locations_metadata_jobs_createinsertprojectsId, locationsIdmetadataJobId, validateOnlyCreates 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_cancelexecprojectsId, locationsId, metadataJobsIdCancels 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.

NameDatatypeDescription
locationsIdstring
metadataJobsIdstring
projectsIdstring
filterstring
metadataJobIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
validateOnlyboolean

SELECT examples

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;

INSERT examples

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
;

Lifecycle Methods

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;