Class/Object

com.spotify.scio.bigquery

BigQueryClient

Related Docs: object BigQueryClient | package bigquery

Permalink

class BigQueryClient extends AnyRef

A simple BigQuery client.

Self Type
BigQueryClient
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BigQueryClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BigQueryClient(projectId: String, secretFile: File)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def extractLocation(sqlQuery: String): Option[String]

    Permalink

    Extract locations of tables to be access by a query.

  9. def extractTables(sqlQuery: String): Set[TableReference]

    Permalink

    Extract tables to be accessed by a query.

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getQueryRows(sqlQuery: String, flattenResults: Boolean = false): Iterator[TableRow]

    Permalink

    Get rows from a query.

  13. def getQuerySchema(sqlQuery: String): TableSchema

    Permalink

    Get schema for a query without executing it.

  14. def getTable(table: TableReference): Table

    Permalink

    Get table metadata.

  15. def getTable(tableSpec: String): Table

    Permalink

    Get table metadata.

  16. def getTableRows(table: TableReference): Iterator[TableRow]

    Permalink

    Get rows from a table.

  17. def getTableRows(tableSpec: String): Iterator[TableRow]

    Permalink

    Get rows from a table.

  18. def getTableSchema(table: TableReference): TableSchema

    Permalink

    Get schema from a table.

  19. def getTableSchema(tableSpec: String): TableSchema

    Permalink

    Get schema from a table.

  20. def getTables(projectId: String, datasetId: String): Seq[TableReference]

    Permalink

    Get list of tables in a dataset.

  21. def getTypedRows[T <: HasAnnotation](newSource: String = null)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Iterator[T]

    Permalink

    Get a typed iterator for a BigQuery SELECT query or table.

    Get a typed iterator for a BigQuery SELECT query or table.

    Note that T must be annotated with BigQueryType.fromSchema, BigQueryType.fromTable, BigQueryType.fromQuery, or BigQueryType.toTable.

    By default the source (table or query) specified in the annotation will be used, but it can be overridden with the newSource parameter. For example:

    @BigQueryType.fromTable("publicdata:samples.gsod")
    class Row
    
    // Read from [publicdata:samples.gsod] as specified in the annotation.
    bq.getTypedRows[Row]()
    
    // Read from [myproject:samples.gsod] instead.
    bq.getTypedRows[Row]("myproject:samples.gsod")
    
    // Read from a query instead.
    bq.getTypedRows[Row]("SELECT * FROM [publicdata:samples.gsod] LIMIT 1000")
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def query(sqlQuery: String, destinationTable: String = null, flattenResults: Boolean = false): TableReference

    Permalink

    Make a query and save results to a destination table.

    Make a query and save results to a destination table.

    A temporary table will be created if destinationTable is null and a cached table will be returned instead if one exists.

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def tableExists(tableSpec: String): Boolean

    Permalink

    Check if table exists.

    Check if table exists. Returns true if table exists, false is table definitely does not exist, throws in other cases (BigQuery exception, network issue etc.).

  30. def tableExists(table: TableReference): Boolean

    Permalink

    Check if table exists.

    Check if table exists. Returns true if table exists, false is table definitely does not exist, throws in other cases (BigQuery exception, network issue etc.).

  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def waitForJobs(jobs: QueryJob*): Unit

    Permalink

    Wait for all jobs to finish.

  36. def writeTableRows(tableSpec: String, rows: List[TableRow], schema: TableSchema = null, writeDisposition: WriteDisposition = WRITE_EMPTY, createDisposition: CreateDisposition = CREATE_IF_NEEDED): Unit

    Permalink

    Write rows to a table.

  37. def writeTableRows(table: TableReference, rows: List[TableRow], schema: TableSchema, writeDisposition: WriteDisposition, createDisposition: CreateDisposition): Unit

    Permalink

    Write rows to a table.

  38. def writeTypedRows[T <: HasAnnotation](tableSpec: String, rows: List[T], writeDisposition: WriteDisposition = WRITE_EMPTY, createDisposition: CreateDisposition = CREATE_IF_NEEDED)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Unit

    Permalink

    Write a List of rows to a BigQuery table.

    Write a List of rows to a BigQuery table. Note that element type T must be annotated with BigQueryType.

  39. def writeTypedRows[T <: HasAnnotation](table: TableReference, rows: List[T], writeDisposition: WriteDisposition, createDisposition: CreateDisposition)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Unit

    Permalink

    Write a List of rows to a BigQuery table.

    Write a List of rows to a BigQuery table. Note that element type T must be annotated with BigQueryType.

Inherited from AnyRef

Inherited from Any

Ungrouped