Class

com.spotify.scio.bigquery.syntax

ScioContextOps

Related Doc: package syntax

Permalink

final class ScioContextOps extends AnyVal

Enhanced version of ScioContext with BigQuery methods.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScioContextOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScioContextOps(self: ScioContext)

    Permalink

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def bigQuerySelect(sqlQuery: String, flattenResults: Boolean = ...): SCollection[TableRow]

    Permalink

    Get an SCollection for a BigQuery SELECT query.

    Get an SCollection for a BigQuery SELECT query. Both Legacy SQL and Standard SQL dialects are supported. By default the query dialect will be automatically detected. To override this behavior, start the query string with #legacysql or #standardsql.

  6. def bigQueryStorage(table: Table, selectedFields: List[String] = Nil, rowRestriction: String = null): SCollection[TableRow]

    Permalink

    Get an SCollection for a BigQuery table using the storage API.

    Get an SCollection for a BigQuery table using the storage API.

    selectedFields

    names of the fields in the table that should be read. If empty, all fields will be read. If the specified field is a nested field, all the sub-fields in the field will be selected.

    rowRestriction

    SQL text filtering statement, similar ti a WHERE clause in a query. Currently, we support combinations of predicates that are a comparison between a column and a constant value in SQL statement. Aggregates are not supported. For example:

    "a > DATE '2014-09-27' AND (b > 5 AND c LIKE 'date')"
  7. def bigQueryTable(table: Table): SCollection[TableRow]

    Permalink

    Get an SCollection for a BigQuery table.

  8. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  10. def tableRowJsonFile(path: String): SCollection[TableRow]

    Permalink

    Get an SCollection for a BigQuery TableRow JSON file.

  11. def toString(): String

    Permalink
    Definition Classes
    Any
  12. def typedBigQuery[T <: HasAnnotation](newSource: String = null)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T], arg2: Coder[T]): SCollection[T]

    Permalink

    Get a typed SCollection for a BigQuery SELECT query, table or storage.

    Get a typed SCollection for a BigQuery SELECT query, table or storage.

    Note that T must be annotated with BigQueryType.fromSchema, BigQueryType.fromStorage, 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.
    sc.typedBigQuery[Row]()
    
    // Read from [myproject:samples.gsod] instead.
    sc.typedBigQuery[Row]("myproject:samples.gsod")
    
    // Read from a query instead.
    sc.typedBigQuery[Row]("SELECT * FROM [publicdata:samples.gsod] LIMIT 1000")

    Both Legacy SQL and Standard SQL dialects are supported. By default the query dialect will be automatically detected. To override this behavior, start the query string with #legacysql or #standardsql.

  13. def typedBigQueryStorage[T <: HasAnnotation](newSource: String = null, rowRestriction: String = null)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T], arg2: Coder[T]): SCollection[T]

    Permalink

    Get a typed SCollection for a BigQuery storage API.

    Get a typed SCollection for a BigQuery storage API.

    Note that T must be annotated with BigQueryType.fromStorage.

    Similar to typedBigQuery but allows rowRestriction to be overridden.

Deprecated Value Members

  1. def bigQueryTable(tableSpec: String): SCollection[TableRow]

    Permalink

    Get an SCollection for a BigQuery table.

    Get an SCollection for a BigQuery table.

    Annotations
    @deprecated
    Deprecated

    (Since version Scio 0.8) this method will be removed; use bigQueryTable(Table.Spec(table)) instead

  2. def bigQueryTable(table: TableReference): SCollection[TableRow]

    Permalink

    Get an SCollection for a BigQuery table.

    Get an SCollection for a BigQuery table.

    Annotations
    @deprecated
    Deprecated

    (Since version Scio 0.8) this method will be removed; use bigQueryTable(Table.Ref(table)) instead

Inherited from AnyVal

Inherited from Any

Ungrouped