Packages

c

com.spotify.scio.bigquery.syntax

SCollectionTypedOps

final class SCollectionTypedOps[T <: HasAnnotation] extends AnyVal

Enhanced version of SCollection with BigQuery methods.

Source
SCollectionSyntax.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SCollectionTypedOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SCollectionTypedOps(self: SCollection[T])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  7. def saveAsTypedBigQueryTable(table: Table, timePartitioning: TimePartitioning = TableWriteParam.DefaultTimePartitioning, writeDisposition: WriteDisposition = TableWriteParam.DefaultWriteDisposition, createDisposition: CreateDisposition = TableWriteParam.DefaultCreateDisposition, clustering: Clustering = TableWriteParam.DefaultClustering, method: Method = TableWriteParam.DefaultMethod, triggeringFrequency: Duration = TableWriteParam.DefaultTriggeringFrequency, sharding: Sharding = TableWriteParam.DefaultSharding, failedInsertRetryPolicy: InsertRetryPolicy = TableWriteParam.DefaultFailedInsertRetryPolicy, successfulInsertsPropagation: Boolean = TableWriteParam.DefaultSuccessfulInsertsPropagation, extendedErrorInfo: Boolean = TableWriteParam.DefaultExtendedErrorInfo, configOverride: BigQueryTyped.Table.WriteParam.ConfigOverride[T] = TableWriteParam.DefaultConfigOverride)(implicit tt: scala.reflect.api.JavaUniverse.TypeTag[T], coder: Coder[T]): ClosedTap[T]

    Save this SCollection as a BigQuery table.

    Save this SCollection as a BigQuery table. Note that element type T must be annotated with BigQueryType.

    This could be a complete case class with BigQueryType.toTable. For example:

    @BigQueryType.toTable
    case class Result(name: String, score: Double)
    
    val p: SCollection[Result] = // process data and convert elements to Result
    p.saveAsTypedBigQueryTable(Table.Spec("myproject:mydataset.mytable"))

    It could also be an empty class with schema from BigQueryType.fromSchema, BigQueryType.fromTable, or BigQueryType.fromQuery. For example:

    @BigQueryType.fromTable("bigquery-public-data:samples.gsod")
    class Row
    
    sc.typedBigQuery[Row]()
      .sample(withReplacement = false, fraction = 0.1)
      .saveAsTypedBigQueryTable(Table.Spec("myproject:samples.gsod"))

    *

    returns

    a ClosedTap containing some side output(s) depending on the given parameters

  8. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped