- Resource: MigrationWorkflow
- MigrationTask
- AssessmentTaskDetails
- AssessmentFeatureHandle
- TranslationConfigDetails
- ObjectNameMappingList
- ObjectNameMapping
- NameMappingKey
- Type
- NameMappingValue
- Dialect
- BigQueryDialect
- HiveQLDialect
- RedshiftDialect
- TeradataDialect
- Mode
- OracleDialect
- SparkSQLDialect
- SnowflakeDialect
- NetezzaDialect
- AzureSynapseDialect
- VerticaDialect
- SQLServerDialect
- PostgresqlDialect
- PrestoDialect
- MySQLDialect
- DB2Dialect
- SQLiteDialect
- GreenplumDialect
- SourceEnv
- TranslationDetails
- SourceTargetMapping
- SourceSpec
- Literal
- TargetSpec
- SourceEnvironment
- SuggestionConfig
- SuggestionStep
- SuggestionType
- RewriteTarget
- State
- MigrationTaskResult
- TranslationTaskResult
- GcsReportLogMessage
- TaskOutput
- LineageOutput
- RecognizedInput
- Type
- ProgressReport
- ProcessingStage
- WorkSummary
- State
- State
- State
- Methods
Resource: MigrationWorkflow
A migration workflow which specifies what needs to be done for an EDW migration.
| JSON representation |
|---|
{ "name": string, "displayName": string, "tasks": { string: { object ( |
| Fields | |
|---|---|
name |
Output only. Immutable. Identifier. The unique identifier for the migration workflow. The ID is server-generated. Example: |
displayName |
The display name of the workflow. This can be set to give a workflow a descriptive name. There is no guarantee or enforcement of uniqueness. |
tasks |
The tasks in a workflow in a named map. The name (i.e. key) has no meaning and is merely a convenient way to address a specific task in a workflow. |
state |
Output only. That status of the workflow. |
createTime |
Output only. Time when the workflow was created. |
lastUpdateTime |
Output only. Time when the workflow was last updated. |
MigrationTask
A single task for a migration which has details about the configuration of the task.
| JSON representation |
|---|
{ "id": string, "type": string, "state": enum ( |
| Fields | |
|---|---|
id |
Output only. Immutable. The unique identifier for the migration task. The ID is server-generated. |
type |
The type of the task. This must be one of the supported task types. Assessment:
Translation: See Supported Task Types for a list of supported task types. |
state |
Output only. The current state of the task. |
processingError |
Output only. An explanation that may be populated when the task is in FAILED state. |
createTime |
Output only. Time when the task was created. |
lastUpdateTime |
Output only. Time when the task was last updated. |
resourceErrorDetails[] |
Output only. Provides details to errors and issues encountered while processing the task. Presence of error details does not mean that the task failed. |
resourceErrorCount |
Output only. The number or resources with errors. Note: This is not the total number of errors as each resource can have more than one error. This is used to indicate truncation by having a |
metrics[] |
Output only. The metrics for the task. |
taskResult |
Output only. The result of the task. |
totalProcessingErrorCount |
Output only. Count of all the processing errors in this task and its subtasks. |
totalResourceErrorCount |
Output only. Count of all the resource errors in this task and its subtasks. |
Union field task_details. The details of the task. task_details can be only one of the following: |
|
assessmentTaskDetails |
Task configuration for Assessment. |
translationConfigDetails |
Task configuration for CW Batch/Offline SQL Translation. |
translationDetails |
Task details for unified SQL Translation. |
AssessmentTaskDetails
Assessment task config.
| JSON representation |
|---|
{
"inputPath": string,
"outputDataset": string,
"querylogsPath": string,
"dataSource": string,
"featureHandle": {
object ( |
| Fields | |
|---|---|
inputPath |
Required. The Cloud Storage path for assessment input files. |
outputDataset |
Required. The BigQuery dataset for output. |
querylogsPath |
Optional. An optional Cloud Storage path to write the query logs (which is then used as an input path on the translation task) |
dataSource |
Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) from which the input data is extracted. |
featureHandle |
Optional. A collection of additional feature flags for this assessment. |
AssessmentFeatureHandle
User-definable feature flags for assessment tasks.
| JSON representation |
|---|
{ "addShareableDataset": boolean, "generateTcoReport": boolean } |
| Fields | |
|---|---|
addShareableDataset |
Optional. Whether to create a dataset containing non-PII data in addition to the output dataset. |
generateTcoReport |
Optional. Whether the TCO report Google Doc generation is allowlisted for the project. |
TranslationConfigDetails
The translation config to capture necessary settings for a translation task and subtask.
| JSON representation |
|---|
{ "sourceDialect": { object ( |
| Fields | |
|---|---|
sourceDialect |
The dialect of the input files. |
targetDialect |
The target dialect for the engine to translate the input to. |
sourceEnv |
The default source environment values for the translation. |
requestSource |
The indicator to show translation request initiator. |
targetTypes[] |
The types of output to generate, e.g. sql, metadata etc. If not specified, a default set of targets will be generated. Some additional target types may be slower to generate. See the documentation for the set of available target types. |
Union field source_location. The chosen path where the source for input files will be found. source_location can be only one of the following: |
|
gcsSourcePath |
The Cloud Storage path for a directory of files to translate in a task. |
Union field target_location. The chosen path where the destination for output files will be found. target_location can be only one of the following: |
|
gcsTargetPath |
The Cloud Storage path to write back the corresponding input files to. |
Union field output_name_mapping. The mapping of full SQL object names from their current state to the desired output. output_name_mapping can be only one of the following: |
|
nameMappingList |
The mapping of objects to their desired output names in list form. |
ObjectNameMappingList
Represents a map of name mappings using a list of key:value proto messages of existing name to desired output name.
| JSON representation |
|---|
{
"nameMap": [
{
object ( |
| Fields | |
|---|---|
nameMap[] |
The elements of the object name map. |
ObjectNameMapping
Represents a key-value pair of NameMappingKey to NameMappingValue to represent the mapping of SQL names from the input value to desired output.
| JSON representation |
|---|
{ "source": { object ( |
| Fields | |
|---|---|
source |
The name of the object in source that is being mapped. |
target |
The desired target name of the object that is being mapped. |
NameMappingKey
The potential components of a full name mapping that will be mapped during translation in the source data warehouse.
| JSON representation |
|---|
{
"type": enum ( |
| Fields | |
|---|---|
type |
The type of object that is being mapped. |
database |
The database name (BigQuery project ID equivalent in the source data warehouse). |
schema |
The schema name (BigQuery dataset equivalent in the source data warehouse). |
relation |
The relation name (BigQuery table or view equivalent in the source data warehouse). |
attribute |
The attribute name (BigQuery column equivalent in the source data warehouse). |
Type
The type of the object that is being mapped.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Unspecified name mapping type. |
DATABASE |
The object being mapped is a database. |
SCHEMA |
The object being mapped is a schema. |
RELATION |
The object being mapped is a relation. |
ATTRIBUTE |
The object being mapped is an attribute. |
RELATION_ALIAS |
The object being mapped is a relation alias. |
ATTRIBUTE_ALIAS |
The object being mapped is a an attribute alias. |
FUNCTION |
The object being mapped is a function. |
NameMappingValue
The potential components of a full name mapping that will be mapped during translation in the target data warehouse.
| JSON representation |
|---|
{ "database": string, "schema": string, "relation": string, "attribute": string } |
| Fields | |
|---|---|
database |
The database name (BigQuery project ID equivalent in the target data warehouse). |
schema |
The schema name (BigQuery dataset equivalent in the target data warehouse). |
relation |
The relation name (BigQuery table or view equivalent in the target data warehouse). |
attribute |
The attribute name (BigQuery column equivalent in the target data warehouse). |
Dialect
The possible dialect options for translation.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field dialect_value. The possible dialect options that this message represents. dialect_value can be only one of the following: |
|
bigqueryDialect |
The BigQuery dialect |
hiveqlDialect |
The HiveQL dialect |
redshiftDialect |
The Redshift dialect |
teradataDialect |
The Teradata dialect |
oracleDialect |
The Oracle dialect |
sparksqlDialect |
The SparkSQL dialect |
snowflakeDialect |
The Snowflake dialect |
netezzaDialect |
The Netezza dialect |
azureSynapseDialect |
The Azure Synapse dialect |
verticaDialect |
The Vertica dialect |
sqlServerDialect |
The SQL Server dialect |
postgresqlDialect |
The Postgresql dialect |
prestoDialect |
The Presto dialect |
mysqlDialect |
The MySQL dialect |
db2Dialect |
DB2 dialect |
sqliteDialect |
SQLite dialect |
greenplumDialect |
Greenplum dialect |
BigQueryDialect
This type has no fields.
The dialect definition for BigQuery.
HiveQLDialect
This type has no fields.
The dialect definition for HiveQL.
RedshiftDialect
This type has no fields.
The dialect definition for Redshift.
TeradataDialect
The dialect definition for Teradata.
| JSON representation |
|---|
{
"mode": enum ( |
| Fields | |
|---|---|
mode |
Which Teradata sub-dialect mode the user specifies. |
Mode
The sub-dialect options for Teradata.
| Enums | |
|---|---|
MODE_UNSPECIFIED |
Unspecified mode. |
SQL |
Teradata SQL mode. |
BTEQ |
BTEQ mode (which includes SQL). |
OracleDialect
This type has no fields.
The dialect definition for Oracle.
SparkSQLDialect
This type has no fields.
The dialect definition for SparkSQL.
SnowflakeDialect
This type has no fields.
The dialect definition for Snowflake.
NetezzaDialect
This type has no fields.
The dialect definition for Netezza.
AzureSynapseDialect
This type has no fields.
The dialect definition for Azure Synapse.
VerticaDialect
This type has no fields.
The dialect definition for Vertica.
SQLServerDialect
This type has no fields.
The dialect definition for SQL Server.
PostgresqlDialect
This type has no fields.
The dialect definition for Postgresql.
PrestoDialect
This type has no fields.
The dialect definition for Presto.
MySQLDialect
This type has no fields.
The dialect definition for MySQL.
DB2Dialect
This type has no fields.
The dialect definition for DB2.
SQLiteDialect
This type has no fields.
The dialect definition for SQLite.
GreenplumDialect
This type has no fields.
The dialect definition for Greenplum.
SourceEnv
Represents the default source environment values for the translation.
| JSON representation |
|---|
{ "defaultDatabase": string, "schemaSearchPath": [ string ], "metadataStoreDataset": string } |
| Fields | |
|---|---|
defaultDatabase |
The default database name to fully qualify SQL objects when their database name is missing. |
schemaSearchPath[] |
The schema search path. When SQL objects are missing schema name, translation engine will search through this list to find the value. |
metadataStoreDataset |
Optional. Expects a valid BigQuery dataset ID that exists, e.g., project-123.metadata_store_123. If specified, translation will search and read the required schema information from a metadata store in this dataset. If metadata store doesn't exist, translation will parse the metadata file and upload the schema info to a temp table in the dataset to speed up future translation jobs. |
TranslationDetails
The translation details to capture the necessary settings for a translation job.
| JSON representation |
|---|
{ "sourceTargetMapping": [ { object ( |
| Fields | |
|---|---|
sourceTargetMapping[] |
The mapping from source to target SQL. |
targetBaseUri |
The base URI for all writes to persistent storage. |
sourceEnvironment |
The default source environment values for the translation. |
targetReturnLiterals[] |
The list of literal targets that will be directly returned to the response. Each entry consists of the constructed path, EXCLUDING the base path. Not providing a targetBaseUri will prevent writing to persistent storage. |
targetTypes[] |
The types of output to generate, e.g. sql, metadata, lineage_from_sql_scripts, etc. If not specified, a default set of targets will be generated. Some additional target types may be slower to generate. See the documentation for the set of available target types. |
suggestionConfig |
The configuration for the suggestion if requested as a target type. |
SourceTargetMapping
Represents one mapping from a source SQL to a target SQL.
| JSON representation |
|---|
{ "sourceSpec": { object ( |
| Fields | |
|---|---|
sourceSpec |
The source SQL or the path to it. |
targetSpec |
The target SQL or the path for it. |
SourceSpec
Represents one path to the location that holds source data.
| JSON representation |
|---|
{ "encoding": string, // Union field |
| Fields | |
|---|---|
encoding |
Optional. The optional field to specify the encoding of the sql bytes. |
Union field source. The specific source SQL. source can be only one of the following: |
|
baseUri |
The base URI for all files to be read in as sources for translation. |
literal |
Source literal. |
gcsFilePath |
The path to a single source file in Cloud Storage. |
Literal
Literal data.
| JSON representation |
|---|
{ "relativePath": string, // Union field |
| Fields | |
|---|---|
relativePath |
Required. The identifier of the literal entry. |
Union field literal_data. The literal SQL contents. literal_data can be only one of the following: |
|
literalString |
Literal string data. |
literalBytes |
Literal byte data. |
TargetSpec
Represents one path to the location that holds target data.
| JSON representation |
|---|
{ "relativePath": string } |
| Fields | |
|---|---|
relativePath |
The relative path for the target data. Given source file |
SourceEnvironment
Represents the default source environment values for the translation.
| JSON representation |
|---|
{ "defaultDatabase": string, "schemaSearchPath": [ string ], "metadataStoreDataset": string } |
| Fields | |
|---|---|
defaultDatabase |
The default database name to fully qualify SQL objects when their database name is missing. |
schemaSearchPath[] |
The schema search path. When SQL objects are missing schema name, translation engine will search through this list to find the value. |
metadataStoreDataset |
Optional. Expects a validQ BigQuery dataset ID that exists, e.g., project-123.metadata_store_123. If specified, translation will search and read the required schema information from a metadata store in this dataset. If metadata store doesn't exist, translation will parse the metadata file and upload the schema info to a temp table in the dataset to speed up future translation jobs. |
SuggestionConfig
The configuration for the suggestion if requested as a target type.
| JSON representation |
|---|
{
"skipSuggestionSteps": [
{
object ( |
| Fields | |
|---|---|
skipSuggestionSteps[] |
The list of suggestion steps to skip. |
SuggestionStep
Suggestion step to skip.
| JSON representation |
|---|
{ "suggestionType": enum ( |
| Fields | |
|---|---|
suggestionType |
The type of suggestion. |
rewriteTarget |
The rewrite target. |
SuggestionType
Suggestion type.
| Enums | |
|---|---|
SUGGESTION_TYPE_UNSPECIFIED |
Suggestion type unspecified. |
QUERY_CUSTOMIZATION |
Query customization. |
TRANSLATION_EXPLANATION |
Translation explanation. |
RewriteTarget
The target to apply the suggestion to.
| Enums | |
|---|---|
REWRITE_TARGET_UNSPECIFIED |
Rewrite target unspecified. |
SOURCE_SQL |
Source SQL. |
TARGET_SQL |
Target SQL. |
State
Possible states of a migration task.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
The state is unspecified. |
PENDING |
The task is waiting for orchestration. |
ORCHESTRATING |
The task is assigned to an orchestrator. |
RUNNING |
The task is running, i.e. its subtasks are ready for execution. |
PAUSED |
The task is paused. Assigned subtasks can continue, but no new subtasks will be scheduled. |
SUCCEEDED |
The task finished successfully. |
FAILED |
The task finished unsuccessfully. |
MigrationTaskResult
The migration task result.
| JSON representation |
|---|
{ "taskOutputs": { string: { object ( |
| Fields | |
|---|---|
taskOutputs |
The map of task output types to the task outputs, e.g. "LINEAGE". |
Union field details. Details specific to the task type. details can be only one of the following: |
|
translationTaskResult |
Details specific to translation task types. |
TranslationTaskResult
Translation specific result details from the migration task.
| JSON representation |
|---|
{ "translatedLiterals": [ { object ( |
| Fields | |
|---|---|
translatedLiterals[] |
The list of the translated literals. |
reportLogMessages[] |
The records from the aggregate CSV report for a migration workflow. |
consoleUri |
The Cloud Console URI for the migration workflow. |
GcsReportLogMessage
A record in the aggregate CSV report for a migration workflow
| JSON representation |
|---|
{ "severity": string, "category": string, "filePath": string, "filename": string, "sourceScriptLine": integer, "sourceScriptColumn": integer, "message": string, "scriptContext": string, "action": string, "effect": string, "objectName": string } |
| Fields | |
|---|---|
severity |
Severity of the translation record. |
category |
Category of the error/warning. Example: SyntaxError |
filePath |
The file path in which the error occurred |
filename |
The file name in which the error occurred |
sourceScriptLine |
Specifies the row from the source text where the error occurred (0 based, -1 for messages without line location). Example: 2 |
sourceScriptColumn |
Specifies the column from the source texts where the error occurred. (0 based, -1 for messages without column location) example: 6 |
message |
Detailed message of the record. |
scriptContext |
The script context (obfuscated) in which the error occurred |
action |
Category of the error/warning. Example: SyntaxError |
effect |
Effect of the error/warning. Example: COMPATIBILITY |
objectName |
Name of the affected object in the log message. |
TaskOutput
The task output for a task type including the status and any errors.
| JSON representation |
|---|
{ "state": enum ( |
| Fields | |
|---|---|
state |
Output only. The current state of the task output. |
processingError |
An explanation that may be populated when the task output is in FAILED state. |
Union field output. The detailed output of the task. output can be only one of the following: |
|
lineageOutput |
The output of the task with output type "LINEAGE". |
LineageOutput
The output of a task with output type "LINEAGE".
Actual generated lineage can be queried separately (see webappUri), this message contains only metadata: processing status, errors, etc.
| JSON representation |
|---|
{ "webappUri": string, "recognizedInputs": [ { object ( |
| Fields | |
|---|---|
webappUri |
The URI of the webapp that visualizes the lineage. The user needs the |
recognizedInputs[] |
Output only. Recognized lineage inputs. All inputs are processed only if the task succeeds and all work is in state SUCCEEDED (in particular, nothing is SKIPPED). Even with all inputs processed successfully, there may be transpiler errors present leading to inaccurate lineage. |
processingProgressReports[] |
Output only. Work processing progress reports broken up by processing stage. |
RecognizedInput
Information about lineage input of the given type that lineage generation recognized.
If you expected to process more of the given input, verify your input was uploaded and is in the correct format and the request to generate lineage correctly specified the input location.
| JSON representation |
|---|
{
"type": enum ( |
| Fields | |
|---|---|
type |
Output only. The type of the input. |
uncompressedSizeBytes |
Output only. The uncompressed size of the recognized input of the given type. |
Type
Input type recognized by the lineage processing.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
The type is not specified. |
METADATA |
The input is metadata. |
QUERY_LOG |
The input is a query log. |
SCRIPT |
The input is a SQL script. |
ProgressReport
Breaks down processing progress of work.
| JSON representation |
|---|
{ "processingStage": enum ( |
| Fields | |
|---|---|
processingStage |
Output only. The processing stage this progress report describes. |
workSummaries[] |
Output only. Summaries of work broken up by the state of the work. Each work summary describes how much work is in the given state. To get numbers for the total work covered, aggregate the numbers from all summaries. |
ProcessingStage
The processing stage the progress report describes.
| Enums | |
|---|---|
PROCESSING_STAGE_UNSPECIFIED |
The stage is not specified. |
INPUT_INGESTION |
The input ingestion stage. |
POSTPROCESSING |
The lineage DB postprocessing stage. |
WorkSummary
Summary of work in the given state.
| JSON representation |
|---|
{
"state": enum ( |
| Fields | |
|---|---|
state |
Output only. The state of the work this summary describes. |
size |
Output only. Size of the work in the given State. Size counts "units of work". Units represent arbitrary division of work; there's no expectation each unit takes similar time to process. |
comment |
Output only. Human-readable comment. |
State
States of work. Each piece of work is in exactly one state. [SUCCEEDED], [FAILED] and [SKIPPED] are terminal states; work in the [IN_PROGRESS] will eventually transition to one of the terminal states.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
The state is not specified. |
SUCCEEDED |
Work that was processed successfully. |
FAILED |
Work that failed processing. |
IN_PROGRESS |
Work that is currently being processed or queued for processing. |
SKIPPED |
Work that was recognised as necessary to fully process inputs but was skipped due to system limitations. |
State
Possible task output states.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Task output state is unspecified. |
PENDING |
Task output is pending. |
SUCCEEDED |
Task output is succeeded. |
FAILED |
Task output is failed. This does not mean that there is no useful information in the output; partial outputs or failure details may be available. |
State
Possible migration workflow states.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Workflow state is unspecified. |
DRAFT |
Workflow is in draft status, i.e. tasks are not yet eligible for execution. |
RUNNING |
Workflow is running (i.e. tasks are eligible for execution). |
PAUSED |
Workflow is paused. Tasks currently in progress may continue, but no further tasks will be scheduled. |
COMPLETED |
Workflow is complete. There should not be any task in a non-terminal state, but if they are (e.g. forced termination), they will not be scheduled. |
Methods |
|
|---|---|
|
Creates a migration workflow. |
|
Deletes a migration workflow by name. |
|
Gets a previously created migration workflow. |
|
Lists previously created migration workflow. |
|
Starts a previously created migration workflow. |