conversion_workspaces
Creates, updates, deletes, gets or lists a conversion_workspaces
resource.
Overview
Name | conversion_workspaces |
Type | Resource |
Id | google.datamigration.conversion_workspaces |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Full name of the workspace resource, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. |
createTime | string | Output only. The timestamp when the workspace resource was created. |
destination | object | The type and version of a source or 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 | Output only. The timestamp when the workspace was committed. |
source | object | The type and version of a source or destination database. |
updateTime | string | Output only. The timestamp when the workspace resource was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | conversionWorkspacesId, locationsId, projectsId | Gets details of a single conversion workspace. |
list | SELECT | locationsId, projectsId | Lists conversion workspaces in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new conversion workspace in a given project and location. |
delete | DELETE | conversionWorkspacesId, locationsId, projectsId | Deletes a single conversion workspace. |
patch | UPDATE | conversionWorkspacesId, locationsId, projectsId | Updates the parameters of a single conversion workspace. |
apply | EXEC | conversionWorkspacesId, locationsId, projectsId | Applies draft tree onto a specific destination database. |
commit | EXEC | conversionWorkspacesId, locationsId, projectsId | Marks all the data in the conversion workspace as committed. |
convert | EXEC | conversionWorkspacesId, locationsId, projectsId | Creates a draft tree schema for the destination database. |
describe_conversion_workspace_revisions | EXEC | conversionWorkspacesId, locationsId, projectsId | Retrieves a list of committed revisions of a specific conversion workspace. |
describe_database_entities | EXEC | conversionWorkspacesId, locationsId, projectsId | 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. |
rollback | EXEC | conversionWorkspacesId, locationsId, projectsId | Rolls back a conversion workspace to the last committed snapshot. |
search_background_jobs | EXEC | conversionWorkspacesId, locationsId, projectsId | 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. |
seed | EXEC | conversionWorkspacesId, locationsId, projectsId | Imports 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.datamigration.conversion_workspaces (
locationsId,
projectsId,
name,
source,
destination,
globalSettings,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ source }}',
'{{ destination }}',
'{{ globalSettings }}',
'{{ displayName }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: source
value:
- name: engine
value: string
- name: version
value: string
- name: globalSettings
value: object
- name: hasUncommittedChanges
value: boolean
- name: latestCommitId
value: string
- name: latestCommitTime
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: displayName
value: string
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 }}';