conversion_workspaces
Creates, updates, deletes, gets or lists a conversion_workspaces
resource.
Overview
Name | conversion_workspaces |
Type | Resource |
Id | google.datamigration.conversion_workspaces |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. |
createTime | string (google-datetime) | Output only. The timestamp when the workspace resource was created. |
destination | object | Required. The destination engine details. (id: DatabaseEngineInfo) |
destinationProvider | string | Optional. The provider for the destination database. |
displayName | string | Optional. The display name for the workspace. |
globalSettings | object | Optional. 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 |
hasUncommittedChanges | boolean | Output only. Whether the workspace has uncommitted changes (changes which were made after the workspace was committed). |
latestCommitId | string | Output only. The latest commit ID. |
latestCommitTime | string (google-datetime) | Output only. The timestamp when the workspace was committed. |
source | object | Required. The source engine details. (id: DatabaseEngineInfo) |
sourceProvider | string | Optional. The provider for the source database. |
updateTime | string (google-datetime) | Output only. The timestamp when the workspace resource was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. |
createTime | string (google-datetime) | Output only. The timestamp when the workspace resource was created. |
destination | object | Required. The destination engine details. (id: DatabaseEngineInfo) |
destinationProvider | string | Optional. The provider for the destination database. |
displayName | string | Optional. The display name for the workspace. |
globalSettings | object | Optional. 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 |
hasUncommittedChanges | boolean | Output only. Whether the workspace has uncommitted changes (changes which were made after the workspace was committed). |
latestCommitId | string | Output only. The latest commit ID. |
latestCommitTime | string (google-datetime) | Output only. The timestamp when the workspace was committed. |
source | object | Required. The source engine details. (id: DatabaseEngineInfo) |
sourceProvider | string | Optional. The provider for the source database. |
updateTime | string (google-datetime) | Output only. The timestamp when the workspace resource was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , conversionWorkspacesId | Gets details of a single conversion workspace. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter | Lists conversion workspaces in a given project and location. |
create | insert | projectsId , locationsId | conversionWorkspaceId , requestId | Creates a new conversion workspace in a given project and location. |
patch | update | projectsId , locationsId , conversionWorkspacesId | updateMask , requestId | Updates the parameters of a single conversion workspace. |
delete | delete | projectsId , locationsId , conversionWorkspacesId | requestId , force | Deletes a single conversion workspace. |
seed | exec | projectsId , locationsId , conversionWorkspacesId | Imports a snapshot of the source database into the conversion workspace. | |
convert | exec | projectsId , locationsId , conversionWorkspacesId | Creates a draft tree schema for the destination database. | |
commit | exec | projectsId , locationsId , conversionWorkspacesId | Marks all the data in the conversion workspace as committed. | |
rollback | exec | projectsId , locationsId , conversionWorkspacesId | Rolls back a conversion workspace to the last committed snapshot. | |
apply | exec | projectsId , locationsId , conversionWorkspacesId | Applies draft tree onto a specific destination database. | |
describe_database_entities | exec | projectsId , locationsId , conversionWorkspacesId | pageSize , pageToken , tree , uncommitted , commitId , filter , view | Describes 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_jobs | exec | projectsId , locationsId , conversionWorkspacesId | returnMostRecentPerJobType , maxSize , completedUntilTime | Searches/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_revisions | exec | projectsId , locationsId , conversionWorkspacesId | commitId | Retrieves 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.
Name | Datatype | Description |
---|---|---|
conversionWorkspacesId | string | |
locationsId | string | |
projectsId | string | |
commitId | string | |
completedUntilTime | string (google-datetime) | |
conversionWorkspaceId | string | |
filter | string | |
force | boolean | |
maxSize | integer (int32) | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
returnMostRecentPerJobType | boolean | |
tree | string | |
uncommitted | boolean | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
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;
Lists conversion workspaces in a given project and location.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: conversion_workspaces
props:
- name: projectsId
value: string
description: Required parameter for the conversion_workspaces resource.
- name: locationsId
value: string
description: Required parameter for the conversion_workspaces resource.
- name: name
value: string
description: >
Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
- name: source
value: object
description: >
Required. The source engine details.
- name: destination
value: object
description: >
Required. The destination engine details.
- name: globalSettings
value: object
description: >
Optional. 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
- name: displayName
value: string
description: >
Optional. The display name for the workspace.
- name: destinationProvider
value: string
description: >
Optional. The provider for the destination database.
valid_values: ['DATABASE_PROVIDER_UNSPECIFIED', 'CLOUDSQL', 'RDS', 'AURORA', 'ALLOYDB', 'AZURE_DATABASE']
- name: sourceProvider
value: string
description: >
Optional. The provider for the source database.
valid_values: ['DATABASE_PROVIDER_UNSPECIFIED', 'CLOUDSQL', 'RDS', 'AURORA', 'ALLOYDB', 'AZURE_DATABASE']
- name: conversionWorkspaceId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
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
- delete
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
- seed
- convert
- commit
- rollback
- apply
- describe_database_entities
- search_background_jobs
- describe_conversion_workspace_revisions
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 }}"
}';
Creates a draft tree schema for the destination database.
EXEC google.datamigration.conversion_workspaces.convert
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required
@@json=
'{
"autoCommit": {{ autoCommit }},
"filter": "{{ filter }}",
"convertFullPath": {{ convertFullPath }}
}';
Marks all the data in the conversion workspace as committed.
EXEC google.datamigration.conversion_workspaces.commit
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required
@@json=
'{
"commitName": "{{ commitName }}"
}';
Rolls back a conversion workspace to the last committed snapshot.
EXEC google.datamigration.conversion_workspaces.rollback
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required;
Applies draft tree onto a specific destination database.
EXEC google.datamigration.conversion_workspaces.apply
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required
@@json=
'{
"filter": "{{ filter }}",
"dryRun": {{ dryRun }},
"autoCommit": {{ autoCommit }},
"connectionProfile": "{{ connectionProfile }}"
}';
Describes 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.
EXEC google.datamigration.conversion_workspaces.describe_database_entities
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@tree='{{ tree }}',
@uncommitted={{ uncommitted }},
@commitId='{{ commitId }}',
@filter='{{ filter }}',
@view='{{ view }}';
Searches/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.
EXEC google.datamigration.conversion_workspaces.search_background_jobs
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required,
@returnMostRecentPerJobType={{ returnMostRecentPerJobType }},
@maxSize='{{ maxSize }}',
@completedUntilTime='{{ completedUntilTime }}';
Retrieves a list of committed revisions of a specific conversion workspace.
EXEC google.datamigration.conversion_workspaces.describe_conversion_workspace_revisions
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@conversionWorkspacesId='{{ conversionWorkspacesId }}' --required,
@commitId='{{ commitId }}';