congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Bigquery$Tables$Get
Code IndexAdd Tabnine to your IDE (free)

How to use
Bigquery$Tables$Get
in
com.google.api.services.bigquery

Best Java code snippets using com.google.api.services.bigquery.Bigquery$Tables$Get (Showing top 11 results out of 315)

origin: StreakYC/mache

boolean found = true;
try {
  bigquery.tables().get(exporterConfig.getBigqueryProjectId(), exporterConfig.getBigqueryDatasetId(), kind).execute();
origin: com.google.cloud.bigdataoss/bigquery-connector

/**
 * Returns true if the table exists, or false if not.
 */
public boolean tableExists(TableReference tableRef) throws IOException {
 try {
  Table fetchedTable = service.tables().get(
    tableRef.getProjectId(), tableRef.getDatasetId(), tableRef.getTableId()).execute();
  logger.atFine().log(
    "Successfully fetched table '%s' for tableRef '%s'", fetchedTable, tableRef);
  return true;
 } catch (IOException ioe) {
  if (errorExtractor.itemNotFound(ioe)) {
   return false;
  } else {
   // Unhandled exceptions should just propagate up.
   throw ioe;
  }
 }
}
origin: com.google.apis/google-api-services-bigquery

/**
 * Gets the specified table resource by table ID. This method does not return the data in the table,
 * it only returns the table resource, which describes the structure of this table.
 *
 * Create a request for the method "tables.get".
 *
 * This request holds the parameters needed by the bigquery server.  After setting any optional
 * parameters, call the {@link Get#execute()} method to invoke the remote operation.
 *
 * @param projectId Project ID of the requested table
 * @param datasetId Dataset ID of the requested table
 * @param tableId Table ID of the requested table
 * @return the request
 */
public Get get(java.lang.String projectId, java.lang.String datasetId, java.lang.String tableId) throws java.io.IOException {
 Get result = new Get(projectId, datasetId, tableId);
 initialize(result);
 return result;
}
origin: com.google.cloud/google-cloud-bigquery

@Override
public Table getTable(
  String projectId, String datasetId, String tableId, Map<Option, ?> options) {
 try {
  return bigquery
    .tables()
    .get(projectId, datasetId, tableId)
    .setFields(Option.FIELDS.getString(options))
    .execute();
 } catch (IOException ex) {
  BigQueryException serviceException = translate(ex);
  if (serviceException.getCode() == HTTP_NOT_FOUND) {
   return null;
  }
  throw serviceException;
 }
}
origin: com.google.gcloud/gcloud-java-bigquery

@Override
public Table getTable(String datasetId, String tableId, Map<Option, ?> options) {
 try {
  return bigquery.tables()
    .get(this.options.projectId(), datasetId, tableId)
    .setFields(FIELDS.getString(options))
    .execute();
 } catch (IOException ex) {
  BigQueryException serviceException = translate(ex);
  if (serviceException.code() == HTTP_NOT_FOUND) {
   return null;
  }
  throw serviceException;
 }
}
origin: com.google.cloud/gcloud-java-bigquery

@Override
public Table getTable(String datasetId, String tableId, Map<Option, ?> options) {
 try {
  return bigquery.tables()
    .get(this.options.projectId(), datasetId, tableId)
    .setFields(FIELDS.getString(options))
    .execute();
 } catch (IOException ex) {
  BigQueryException serviceException = translate(ex);
  if (serviceException.code() == HTTP_NOT_FOUND) {
   return null;
  }
  throw serviceException;
 }
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

private TableSchema getSchema(Bigquery bq) {
 try {
  return bq.tables()
    .get(
      pipelineOptions.getProject(),
      pipelineOptions.getTargetDataset(),
      table.getTableReference().getTableId())
    .execute()
    .getSchema();
 } catch (IOException e) {
  throw new RuntimeException(e);
 }
}
origin: com.google.cloud.bigdataoss/bigquery-connector

/**
 * Gets the specified table resource by table ID. This method does not return the data in the
 * table, it only returns the table resource, which describes the structure of this table.
 *
 * @param tableRef The BigQuery table reference.
 * @return The table resource, which describes the structure of this table.
 * @throws IOException
 */
public Table getTable(TableReference tableRef)
  throws IOException {
 Bigquery.Tables.Get getTablesReply = service.tables().get(
   tableRef.getProjectId(), tableRef.getDatasetId(), tableRef.getTableId());
 return getTablesReply.execute();
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

private void onTableGet(Table table) throws IOException {
 when(mockClient.tables()).thenReturn(mockTables);
 when(mockTables.get(anyString(), anyString(), anyString())).thenReturn(mockTablesGet);
 when(mockTablesGet.execute()).thenReturn(table);
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

private void verifyTableGet() throws IOException {
 verify(mockClient).tables();
 verify(mockTables).get("project", "dataset", "table");
 verify(mockTablesGet, atLeastOnce()).execute();
}
origin: googleapis/google-cloud-java

@Override
public Table getTable(
  String projectId, String datasetId, String tableId, Map<Option, ?> options) {
 try {
  return bigquery
    .tables()
    .get(projectId, datasetId, tableId)
    .setFields(Option.FIELDS.getString(options))
    .execute();
 } catch (IOException ex) {
  BigQueryException serviceException = translate(ex);
  if (serviceException.getCode() == HTTP_NOT_FOUND) {
   return null;
  }
  throw serviceException;
 }
}
com.google.api.services.bigqueryBigquery$Tables$Get

Most used methods

  • execute
  • setFields
  • <init>
    Gets the specified table resource by table ID. This method does not return the data in the table, it

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JCheckBox (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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