本文整理了Java中com.google.api.services.bigquery.model.JobConfiguration.setDryRun()
方法的一些代码示例,展示了JobConfiguration.setDryRun()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JobConfiguration.setDryRun()
方法的具体详情如下:
包路径:com.google.api.services.bigquery.model.JobConfiguration
类名称:JobConfiguration
方法名:setDryRun
[英][Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
[中][可选]如果已设置,则不实际运行此作业。一个有效的查询将返回一个带有一些处理统计信息的大部分为空的响应,而一个无效的查询将返回与非空运行时相同的错误。未定义非查询作业的行为。
代码示例来源:origin: googleapis/google-cloud-java
queryConfigurationPb.setQueryParameters(queryParametersPb);
configurationPb.setDryRun(dryRun());
if (allowLargeResults != null) {
queryConfigurationPb.setAllowLargeResults(allowLargeResults);
代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform
@Override
public JobStatistics dryRunQuery(
String projectId, JobConfigurationQuery queryConfig, String location)
throws InterruptedException, IOException {
JobReference jobRef = new JobReference().setLocation(location).setProjectId(projectId);
Job job =
new Job()
.setJobReference(jobRef)
.setConfiguration(new JobConfiguration().setQuery(queryConfig).setDryRun(true));
return executeWithRetries(
client.jobs().insert(projectId, job),
String.format(
"Unable to dry run query: %s, aborting after %d retries.",
queryConfig, MAX_RPC_RETRIES),
Sleeper.DEFAULT,
createDefaultBackoff(),
ALWAYS_RETRY)
.getStatistics();
}
代码示例来源:origin: com.spotify/scio-bigquery
.setConfiguration(new JobConfiguration()
.setQuery(queryConfig)
.setDryRun(true));
JobStatistics jobStats = executeWithBackOff(
client.jobs().insert(projectId, dryRunJob),
代码示例来源:origin: com.google.cloud/google-cloud-bigquery
queryConfigurationPb.setQueryParameters(queryParametersPb);
configurationPb.setDryRun(dryRun());
if (allowLargeResults != null) {
queryConfigurationPb.setAllowLargeResults(allowLargeResults);
代码示例来源:origin: com.google.gcloud/gcloud-java-bigquery
JobConfigurationQuery queryConfigurationPb = new JobConfigurationQuery();
queryConfigurationPb.setQuery(query);
configurationPb.setDryRun(dryRun());
if (allowLargeResults != null) {
queryConfigurationPb.setAllowLargeResults(allowLargeResults);
代码示例来源:origin: com.google.cloud/gcloud-java-bigquery
JobConfigurationQuery queryConfigurationPb = new JobConfigurationQuery();
queryConfigurationPb.setQuery(query);
configurationPb.setDryRun(dryRun());
if (allowLargeResults != null) {
queryConfigurationPb.setAllowLargeResults(allowLargeResults);
内容来源于网络,如有侵权,请联系作者删除!