Skip to main content

conversion_workspaces

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

Overview

Nameconversion_workspaces
TypeResource
Idgoogle.datamigration.conversion_workspaces

Fields

NameDatatypeDescription
namestringFull name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
createTimestringOutput only. The timestamp when the workspace resource was created.
destinationobjectThe type and version of a source or destination database.
displayNamestringOptional. The display name for the workspace.
globalSettingsobjectOptional. A generic list of settings for the workspace. The settings are database pair dependant and can indicate default behavior for the mapping rules engine or turn on or off specific features. Such examples can be: convert_foreign_key_to_interleave=true, skip_triggers=false, ignore_non_table_synonyms=true
hasUncommittedChangesbooleanOutput only. Whether the workspace has uncommitted changes (changes which were made after the workspace was committed).
latestCommitIdstringOutput only. The latest commit ID.
latestCommitTimestringOutput only. The timestamp when the workspace was committed.
sourceobjectThe type and version of a source or destination database.
updateTimestringOutput only. The timestamp when the workspace resource was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTconversionWorkspacesId, locationsId, projectsIdGets details of a single conversion workspace.
listSELECTlocationsId, projectsIdLists conversion workspaces in a given project and location.
createINSERTlocationsId, projectsIdCreates a new conversion workspace in a given project and location.
deleteDELETEconversionWorkspacesId, locationsId, projectsIdDeletes a single conversion workspace.
patchUPDATEconversionWorkspacesId, locationsId, projectsIdUpdates the parameters of a single conversion workspace.
applyEXECconversionWorkspacesId, locationsId, projectsIdApplies draft tree onto a specific destination database.
commitEXECconversionWorkspacesId, locationsId, projectsIdMarks all the data in the conversion workspace as committed.
convertEXECconversionWorkspacesId, locationsId, projectsIdCreates a draft tree schema for the destination database.
describe_conversion_workspace_revisionsEXECconversionWorkspacesId, locationsId, projectsIdRetrieves a list of committed revisions of a specific conversion workspace.
describe_database_entitiesEXECconversionWorkspacesId, locationsId, projectsIdDescribes the database entities tree for a specific conversion workspace and a specific tree type. Database entities are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are simple data objects describing the structure of the client database.
rollbackEXECconversionWorkspacesId, locationsId, projectsIdRolls back a conversion workspace to the last committed snapshot.
search_background_jobsEXECconversionWorkspacesId, locationsId, projectsIdSearches/lists the background jobs for a specific conversion workspace. The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log.
seedEXECconversionWorkspacesId, locationsId, projectsIdImports a snapshot of the source database into the conversion workspace.

SELECT examples

Lists conversion workspaces in a given project and location.

SELECT
name,
createTime,
destination,
displayName,
globalSettings,
hasUncommittedChanges,
latestCommitId,
latestCommitTime,
source,
updateTime
FROM google.datamigration.conversion_workspaces
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.datamigration.conversion_workspaces (
locationsId,
projectsId,
name,
source,
destination,
globalSettings,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ source }}',
'{{ destination }}',
'{{ globalSettings }}',
'{{ displayName }}'
;

UPDATE example

Updates a conversion_workspaces resource.

/*+ update */
UPDATE google.datamigration.conversion_workspaces
SET
name = '{{ name }}',
source = '{{ source }}',
destination = '{{ destination }}',
globalSettings = '{{ globalSettings }}',
displayName = '{{ displayName }}'
WHERE
conversionWorkspacesId = '{{ conversionWorkspacesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified conversion_workspaces resource.

/*+ delete */
DELETE FROM google.datamigration.conversion_workspaces
WHERE conversionWorkspacesId = '{{ conversionWorkspacesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';