docs(samples): add run details#334
Conversation
| String runId = "MY_RUN_ID"; | ||
| // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or | ||
| // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` |
There was a problem hiding this comment.
| String runId = "MY_RUN_ID"; | |
| // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or | |
| // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` | |
| // runId examples: | |
| // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or | |
| // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` | |
| String runId = "MY_RUN_ID"; |
| } catch (ApiException ex) { | ||
| System.out.print("Run details not found." + ex.toString()); | ||
| } |
There was a problem hiding this comment.
Ok, but we prefer (Sample Format guide) that exceptions not be caught if you aren't going to actually do something with them.
| "SELECT CURRENT_TIMESTAMP() as current_time, @run_time as intended_run_time, " | ||
| + "@run_date as intended_run_date, 17 as some_integer"; | ||
| String destinationTableName = | ||
| "MY_DESTINATION_TABLE_" + UUID.randomUUID().toString().substring(0, 8) + "_{run_date}"; |
There was a problem hiding this comment.
This is probably ok, but some of those bits are actually constants. https://tools.ietf.org/html/rfc4122
| .setTransferConfig(transferConfig) | ||
| .build(); | ||
| name = dataTransferServiceClient.createTransferConfig(request).getName(); | ||
| System.out.println("\nScheduled query created successfully :" + name); |
There was a problem hiding this comment.
Hard coding the \n will be caught by various static analyzers.
|
Reaching out to DTS TL about quota issue: will be in touch about this one. |
|
To address the quota issue, for all the DTS samples that involve dataset and scheduled query, let's use our newly created env vars: |
Codecov Report
@@ Coverage Diff @@
## master #334 +/- ##
=========================================
Coverage 74.68% 74.68%
Complexity 108 108
=========================================
Files 7 7
Lines 948 948
Branches 18 18
=========================================
Hits 708 708
Misses 220 220
Partials 20 20 Continue to review full report at Codecov.
|
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: