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:

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. (DATABASE_PROVIDER_UNSPECIFIED, CLOUDSQL, RDS, AURORA, ALLOYDB, AZURE_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. (DATABASE_PROVIDER_UNSPECIFIED, CLOUDSQL, RDS, AURORA, ALLOYDB, AZURE_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, locationsIdfilter, pageSize, pageTokenLists conversion workspaces in a given project and location.
createinsertprojectsId, locationsIdconversionWorkspaceId, requestIdCreates a new conversion workspace in a given project and location.
patchupdateprojectsId, locationsId, conversionWorkspacesIdrequestId, updateMaskUpdates the parameters of a single conversion workspace.
deletedeleteprojectsId, locationsId, conversionWorkspacesIdforce, requestIdDeletes a single conversion workspace.
applyexecprojectsId, locationsId, conversionWorkspacesIdApplies draft tree onto a specific destination database.
commitexecprojectsId, locationsId, conversionWorkspacesIdMarks all the data in the conversion workspace as committed.
convertexecprojectsId, locationsId, conversionWorkspacesIdCreates a draft tree schema for the destination database.
describe_conversion_workspace_revisionsexecprojectsId, locationsId, conversionWorkspacesIdcommitIdRetrieves a list of committed revisions of a specific conversion workspace.
describe_database_entitiesexecprojectsId, locationsId, conversionWorkspacesIdcommitId, filter, pageSize, pageToken, tree, uncommitted, 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.
rollbackexecprojectsId, locationsId, conversionWorkspacesIdRolls back a conversion workspace to the last committed snapshot.
search_background_jobsexecprojectsId, locationsId, conversionWorkspacesIdcompletedUntilTime, maxSize, returnMostRecentPerJobTypeSearches/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.
seedexecprojectsId, locationsId, conversionWorkspacesIdImports a snapshot of the source database into the 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__destination,
data__destinationProvider,
data__displayName,
data__globalSettings,
data__name,
data__source,
data__sourceProvider,
projectsId,
locationsId,
conversionWorkspaceId,
requestId
)
SELECT
'{{ destination }}',
'{{ destinationProvider }}',
'{{ displayName }}',
'{{ globalSettings }}',
'{{ name }}',
'{{ source }}',
'{{ 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__destination = '{{ destination }}',
data__destinationProvider = '{{ destinationProvider }}',
data__displayName = '{{ displayName }}',
data__globalSettings = '{{ globalSettings }}',
data__name = '{{ name }}',
data__source = '{{ source }}',
data__sourceProvider = '{{ sourceProvider }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND conversionWorkspacesId = '{{ conversionWorkspacesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
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 force = '{{ force }}'
AND requestId = '{{ requestId }}'
;

Lifecycle Methods​

Applies draft tree onto a specific destination database.

EXEC google.datamigration.conversion_workspaces.apply
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required
@@json=
'{
"autoCommit": {{ autoCommit }},
"connectionProfile": "{{ connectionProfile }}",
"dryRun": {{ dryRun }},
"filter": "{{ filter }}"
}'
;