congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JobStatistics2
Code IndexAdd Tabnine to your IDE (free)

How to use
JobStatistics2
in
com.google.api.services.bigquery.model

Best Java code snippets using com.google.api.services.bigquery.model.JobStatistics2 (Showing top 14 results out of 315)

origin: googleapis/google-cloud-java

@Override
com.google.api.services.bigquery.model.JobStatistics toPb() {
 JobStatistics2 queryStatisticsPb = new JobStatistics2();
 queryStatisticsPb.setBillingTier(billingTier);
 queryStatisticsPb.setCacheHit(cacheHit);
 queryStatisticsPb.setDdlOperationPerformed(ddlOperationPerformed);
 queryStatisticsPb.setEstimatedBytesProcessed(estimatedBytesProcessed);
 queryStatisticsPb.setTotalBytesBilled(totalBytesBilled);
 queryStatisticsPb.setTotalBytesProcessed(totalBytesProcessed);
 queryStatisticsPb.setTotalPartitionsProcessed(totalPartitionsProcessed);
 queryStatisticsPb.setTotalSlotMs(totalSlotMs);
 if (ddlTargetTable != null) {
  queryStatisticsPb.setDdlTargetTable(ddlTargetTable.toPb());
  queryStatisticsPb.setReferencedTables(
    Lists.transform(referencedTables, TableId.TO_PB_FUNCTION));
  queryStatisticsPb.setStatementType(statementType.toString());
  queryStatisticsPb.setQueryPlan(Lists.transform(queryPlan, QueryStage.TO_PB_FUNCTION));
  queryStatisticsPb.setTimeline(Lists.transform(timeline, TimelineSample.TO_PB_FUNCTION));
  queryStatisticsPb.setSchema(schema.toPb());
origin: googleapis/google-cloud-java

private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) {
 super(statisticsPb);
 if (statisticsPb.getQuery() != null) {
  this.billingTier = statisticsPb.getQuery().getBillingTier();
  this.cacheHit = statisticsPb.getQuery().getCacheHit();
  this.ddlOperationPerformed = statisticsPb.getQuery().getDdlOperationPerformed();
  if (statisticsPb.getQuery().getDdlTargetTable() != null) {
   this.ddlTargetTable = TableId.fromPb(statisticsPb.getQuery().getDdlTargetTable());
  this.estimatedBytesProcessed = statisticsPb.getQuery().getEstimatedBytesProcessed();
  this.numDmlAffectedRows = statisticsPb.getQuery().getNumDmlAffectedRows();
  this.totalBytesBilled = statisticsPb.getQuery().getTotalBytesBilled();
  this.totalBytesProcessed = statisticsPb.getQuery().getTotalBytesProcessed();
  this.totalPartitionsProcessed = statisticsPb.getQuery().getTotalPartitionsProcessed();
  this.totalSlotMs = statisticsPb.getQuery().getTotalSlotMs();
  if (statisticsPb.getQuery().getStatementType() != null) {
   this.statementType = StatementType.valueOf(statisticsPb.getQuery().getStatementType());
  if (statisticsPb.getQuery().getReferencedTables() != null) {
   this.referencedTables =
     Lists.transform(
       statisticsPb.getQuery().getReferencedTables(), TableId.FROM_PB_FUNCTION);
  if (statisticsPb.getQuery().getQueryPlan() != null) {
   this.queryPlan =
     Lists.transform(
       statisticsPb.getQuery().getQueryPlan(), QueryStage.FROM_PB_FUNCTION);
  if (statisticsPb.getQuery().getTimeline() != null) {
   this.timeline =
origin: com.google.cloud/gcloud-java-bigquery

@Override
com.google.api.services.bigquery.model.JobStatistics toPb() {
 JobStatistics2 queryStatisticsPb = new JobStatistics2();
 queryStatisticsPb.setBillingTier(billingTier);
 queryStatisticsPb.setCacheHit(cacheHit);
 queryStatisticsPb.setTotalBytesBilled(totalBytesBilled);
 queryStatisticsPb.setTotalBytesProcessed(totalBytesProcessed);
 if (queryPlan != null) {
  queryStatisticsPb.setQueryPlan(Lists.transform(queryPlan, QueryStage.TO_PB_FUNCTION));
 }
 return super.toPb().setQuery(queryStatisticsPb);
}
origin: com.google.cloud/gcloud-java-bigquery

private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) {
 super(statisticsPb);
 this.billingTier = statisticsPb.getQuery().getBillingTier();
 this.cacheHit = statisticsPb.getQuery().getCacheHit();
 this.totalBytesBilled = statisticsPb.getQuery().getTotalBytesBilled();
 this.totalBytesProcessed = statisticsPb.getQuery().getTotalBytesProcessed();
 if (statisticsPb.getQuery().getQueryPlan() != null) {
  this.queryPlan =
    Lists.transform(statisticsPb.getQuery().getQueryPlan(), QueryStage.FROM_PB_FUNCTION);
 }
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

JobStatistics2 queryStats = new JobStatistics2();
queryStats.setReferencedTables(ImmutableList.of(dryRunTable));
queryJobStats.setQuery(queryStats);
queryJob.setStatus(new JobStatus()).setStatistics(queryJobStats);
  new JobStatistics()
    .setQuery(
      new JobStatistics2()
        .setTotalBytesProcessed(100L)
        .setReferencedTables(ImmutableList.of(table.getTableReference()))));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Test
public void testBigQueryQuerySourceEstimatedSize() throws Exception {
 List<TableRow> data =
   ImmutableList.of(
     new TableRow().set("name", "A").set("number", 10L),
     new TableRow().set("name", "B").set("number", 11L),
     new TableRow().set("name", "C").set("number", 12L));
 PipelineOptions options = PipelineOptionsFactory.create();
 BigQueryOptions bqOptions = options.as(BigQueryOptions.class);
 bqOptions.setProject("project");
 String stepUuid = "testStepUuid";
 String query = FakeBigQueryServices.encodeQuery(data);
 BigQueryQuerySource<TableRow> bqSource =
   BigQueryQuerySource.create(
     stepUuid,
     ValueProvider.StaticValueProvider.of(query),
     true /* flattenResults */,
     true /* useLegacySql */,
     fakeBqServices,
     TableRowJsonCoder.of(),
     BigQueryIO.TableRowParser.INSTANCE,
     QueryPriority.BATCH,
     null);
 fakeJobService.expectDryRunQuery(
   bqOptions.getProject(),
   query,
   new JobStatistics().setQuery(new JobStatistics2().setTotalBytesProcessed(100L)));
 assertEquals(100, bqSource.getEstimatedSizeBytes(bqOptions));
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Override
public long getEstimatedSizeBytes(PipelineOptions options) throws Exception {
 BigQueryOptions bqOptions = options.as(BigQueryOptions.class);
 return dryRunQueryIfNeeded(bqOptions).getQuery().getTotalBytesProcessed();
}
origin: com.spotify/scio-bigquery

@Nullable List<TableReference> tables = jobStats.getQuery().getReferencedTables();
if (tables != null && !tables.isEmpty()) {
 Table table = getTable(tables.get(0));
origin: com.google.gcloud/gcloud-java-bigquery

@Override
com.google.api.services.bigquery.model.JobStatistics toPb() {
 JobStatistics2 queryStatisticsPb = new JobStatistics2();
 queryStatisticsPb.setBillingTier(billingTier);
 queryStatisticsPb.setCacheHit(cacheHit);
 queryStatisticsPb.setTotalBytesBilled(totalBytesBilled);
 queryStatisticsPb.setTotalBytesProcessed(totalBytesProcessed);
 if (queryPlan != null) {
  queryStatisticsPb.setQueryPlan(Lists.transform(queryPlan, QueryStage.TO_PB_FUNCTION));
 }
 return super.toPb().setQuery(queryStatisticsPb);
}
origin: com.google.gcloud/gcloud-java-bigquery

private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) {
 super(statisticsPb);
 this.billingTier = statisticsPb.getQuery().getBillingTier();
 this.cacheHit = statisticsPb.getQuery().getCacheHit();
 this.totalBytesBilled = statisticsPb.getQuery().getTotalBytesBilled();
 this.totalBytesProcessed = statisticsPb.getQuery().getTotalBytesProcessed();
 if (statisticsPb.getQuery().getQueryPlan() != null) {
  this.queryPlan =
    Lists.transform(statisticsPb.getQuery().getQueryPlan(), QueryStage.FROM_PB_FUNCTION);
 }
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

JobStatistics2 queryStats = new JobStatistics2();
queryStats.setReferencedTables(ImmutableList.of(dryRunTable));
queryJobStats.setQuery(queryStats);
queryJob.setStatus(new JobStatus()).setStatistics(queryJobStats);
  new JobStatistics()
    .setQuery(
      new JobStatistics2()
        .setTotalBytesProcessed(100L)
        .setReferencedTables(ImmutableList.of(queryTable))));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

  dryRunQueryIfNeeded(bqOptions).getQuery().getReferencedTables();
if (referencedTables != null && !referencedTables.isEmpty()) {
 TableReference queryTable = referencedTables.get(0);
origin: com.google.cloud/google-cloud-bigquery

@Override
com.google.api.services.bigquery.model.JobStatistics toPb() {
 JobStatistics2 queryStatisticsPb = new JobStatistics2();
 queryStatisticsPb.setBillingTier(billingTier);
 queryStatisticsPb.setCacheHit(cacheHit);
 queryStatisticsPb.setDdlOperationPerformed(ddlOperationPerformed);
 queryStatisticsPb.setEstimatedBytesProcessed(estimatedBytesProcessed);
 queryStatisticsPb.setTotalBytesBilled(totalBytesBilled);
 queryStatisticsPb.setTotalBytesProcessed(totalBytesProcessed);
 queryStatisticsPb.setTotalPartitionsProcessed(totalPartitionsProcessed);
 queryStatisticsPb.setTotalSlotMs(totalSlotMs);
 if (ddlTargetTable != null) {
  queryStatisticsPb.setDdlTargetTable(ddlTargetTable.toPb());
  queryStatisticsPb.setReferencedTables(
    Lists.transform(referencedTables, TableId.TO_PB_FUNCTION));
  queryStatisticsPb.setStatementType(statementType.toString());
  queryStatisticsPb.setQueryPlan(Lists.transform(queryPlan, QueryStage.TO_PB_FUNCTION));
  queryStatisticsPb.setTimeline(Lists.transform(timeline, TimelineSample.TO_PB_FUNCTION));
  queryStatisticsPb.setSchema(schema.toPb());
origin: com.google.cloud/google-cloud-bigquery

private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) {
 super(statisticsPb);
 if (statisticsPb.getQuery() != null) {
  this.billingTier = statisticsPb.getQuery().getBillingTier();
  this.cacheHit = statisticsPb.getQuery().getCacheHit();
  this.ddlOperationPerformed = statisticsPb.getQuery().getDdlOperationPerformed();
  if (statisticsPb.getQuery().getDdlTargetTable() != null) {
   this.ddlTargetTable = TableId.fromPb(statisticsPb.getQuery().getDdlTargetTable());
  this.estimatedBytesProcessed = statisticsPb.getQuery().getEstimatedBytesProcessed();
  this.numDmlAffectedRows = statisticsPb.getQuery().getNumDmlAffectedRows();
  this.totalBytesBilled = statisticsPb.getQuery().getTotalBytesBilled();
  this.totalBytesProcessed = statisticsPb.getQuery().getTotalBytesProcessed();
  this.totalPartitionsProcessed = statisticsPb.getQuery().getTotalPartitionsProcessed();
  this.totalSlotMs = statisticsPb.getQuery().getTotalSlotMs();
  if (statisticsPb.getQuery().getStatementType() != null) {
   this.statementType = StatementType.valueOf(statisticsPb.getQuery().getStatementType());
  if (statisticsPb.getQuery().getReferencedTables() != null) {
   this.referencedTables =
     Lists.transform(
       statisticsPb.getQuery().getReferencedTables(), TableId.FROM_PB_FUNCTION);
  if (statisticsPb.getQuery().getQueryPlan() != null) {
   this.queryPlan =
     Lists.transform(
       statisticsPb.getQuery().getQueryPlan(), QueryStage.FROM_PB_FUNCTION);
  if (statisticsPb.getQuery().getTimeline() != null) {
   this.timeline =
com.google.api.services.bigquery.modelJobStatistics2

Javadoc

Model definition for JobStatistics2.

This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the BigQuery API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

Most used methods

  • <init>
  • getTotalBytesProcessed
    [Output-only] Total bytes processed for the job.
  • setTotalBytesProcessed
    [Output-only] Total bytes processed for the job.
  • getBillingTier
    [Output-only] Billing tier for the job.
  • getCacheHit
    [Output-only] Whether the query result was fetched from the query cache.
  • getQueryPlan
    [Output-only] Describes execution plan for the query.
  • getReferencedTables
    [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not hav
  • getTotalBytesBilled
    [Output-only] Total bytes billed for the job.
  • setBillingTier
    [Output-only] Billing tier for the job.
  • setCacheHit
    [Output-only] Whether the query result was fetched from the query cache.
  • setQueryPlan
    [Output-only] Describes execution plan for the query.
  • setTotalBytesBilled
    [Output-only] Total bytes billed for the job.
  • setQueryPlan,
  • setTotalBytesBilled,
  • setReferencedTables,
  • getDdlOperationPerformed,
  • getDdlTargetTable,
  • getEstimatedBytesProcessed,
  • getNumDmlAffectedRows,
  • getSchema,
  • getStatementType,
  • getTimeline

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • Menu (java.awt)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now