New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bigquery): add migration quickstart #2249
Conversation
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
// Tasks are extensible; the translation task is defined by the BigQuery Migration API. | ||
|
||
translationDetails := &translationtaskpb.TranslationTaskDetails{ | ||
// TODO: we need to stage some suitable translation inputs and complete this definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a GCS path? If so, maybe we could stick something in our sample data bucket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've added some resources to the public sample, but I think they still need work.
Tasks: map[string]*migrationpb.MigrationTask{ | ||
"example_conversion": { | ||
Type: "Translation_Teradata", | ||
Details: anyDetails, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused why the API doesn't use a oneof here. Presumably it only supports a limited number of types + detail messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because the intent is to allow user extension; so you end up with an arbitrary set of task definitions without a central registry.
case <-timeoutCtx.Done(): | ||
return nil, fmt.Errorf("task %s didn't complete due to context expiring", workflow.GetName()) | ||
default: | ||
polledWorkflow, err := client.GetMigrationWorkflow(timeoutCtx, &migrationpb.GetMigrationWorkflowRequest{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear. No long running operation API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at alpha at least.
Filed googleapis/repo-automation-bots#2667 to see what's going on with snippet bot |
Referencing this here since it's not tracked as part of the PR, but it core to the quickstart:
|
Sample output to GCS:
|
No description provided.