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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringFull name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
createTimestring (google-datetime)Output only. The timestamp when the workspace resource was created.
destinationobjectRequired. The destination engine details. (id: DatabaseEngineInfo)
destinationProviderstringOptional. The provider for the 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.
latestCommitTimestring (google-datetime)Output only. The timestamp when the workspace was committed.
sourceobjectRequired. The source engine details. (id: DatabaseEngineInfo)
sourceProviderstringOptional. The provider for the source database.
updateTimestring (google-datetime)Output only. The timestamp when the workspace resource was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, conversionWorkspacesIdGets details of a single conversion workspace.
listselectprojectsId, locationsIdpageSize, pageToken, filterLists conversion workspaces in a given project and location.
createinsertprojectsId, locationsIdconversionWorkspaceId, requestIdCreates a new conversion workspace in a given project and location.
patchupdateprojectsId, locationsId, conversionWorkspacesIdupdateMask, requestIdUpdates the parameters of a single conversion workspace.
deletedeleteprojectsId, locationsId, conversionWorkspacesIdrequestId, forceDeletes a single conversion workspace.
seedexecprojectsId, locationsId, conversionWorkspacesIdImports a snapshot of the source database into the conversion workspace.
convertexecprojectsId, locationsId, conversionWorkspacesIdCreates a draft tree schema for the destination database.
commitexecprojectsId, locationsId, conversionWorkspacesIdMarks all the data in the conversion workspace as committed.
rollbackexecprojectsId, locationsId, conversionWorkspacesIdRolls back a conversion workspace to the last committed snapshot.
applyexecprojectsId, locationsId, conversionWorkspacesIdApplies draft tree onto a specific destination database.
describe_database_entitiesexecprojectsId, locationsId, conversionWorkspacesIdpageSize, pageToken, tree, uncommitted, commitId, filter, viewDescribes 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.
search_background_jobsexecprojectsId, locationsId, conversionWorkspacesIdreturnMostRecentPerJobType, maxSize, completedUntilTimeSearches/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.
describe_conversion_workspace_revisionsexecprojectsId, locationsId, conversionWorkspacesIdcommitIdRetrieves a list of committed revisions of a specific conversion workspace.

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
conversionWorkspacesIdstring
locationsIdstring
projectsIdstring
commitIdstring
completedUntilTimestring (google-datetime)
conversionWorkspaceIdstring
filterstring
forceboolean
maxSizeinteger (int32)
pageSizeinteger (int32)
pageTokenstring
requestIdstring
returnMostRecentPerJobTypeboolean
treestring
uncommittedboolean
updateMaskstring (google-fieldmask)
viewstring

SELECT examples

Gets details of a single conversion workspace.

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

INSERT examples

Creates a new conversion workspace in a given project and location.

INSERT INTO google.datamigration.conversion_workspaces (
data__name,
data__source,
data__destination,
data__globalSettings,
data__displayName,
data__destinationProvider,
data__sourceProvider,
projectsId,
locationsId,
conversionWorkspaceId,
requestId
)
SELECT
'{{ name }}',
'{{ source }}',
'{{ destination }}',
'{{ globalSettings }}',
'{{ displayName }}',
'{{ destinationProvider }}',
'{{ sourceProvider }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ conversionWorkspaceId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single conversion workspace.

UPDATE google.datamigration.conversion_workspaces
SET
data__name = '{{ name }}',
data__source = '{{ source }}',
data__destination = '{{ destination }}',
data__globalSettings = '{{ globalSettings }}',
data__displayName = '{{ displayName }}',
data__destinationProvider = '{{ destinationProvider }}',
data__sourceProvider = '{{ sourceProvider }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND conversionWorkspacesId = '{{ conversionWorkspacesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single conversion workspace.

DELETE FROM google.datamigration.conversion_workspaces
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND conversionWorkspacesId = '{{ conversionWorkspacesId }}' --required
AND requestId = '{{ requestId }}'
AND force = '{{ force }}';

Lifecycle Methods

Imports a snapshot of the source database into the conversion workspace.

EXEC google.datamigration.conversion_workspaces.seed 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required
@@json=
'{
"autoCommit": {{ autoCommit }},
"sourceConnectionProfile": "{{ sourceConnectionProfile }}",
"destinationConnectionProfile": "{{ destinationConnectionProfile }}"
}';