com.twitter.scalding.jdbc

JDBCSource

abstract class JDBCSource extends Source

Extend this source to let scalding read from or write to a database. In order for this to work you need to specify the table name, column definitions and DB credentials. If you write to a DB, the fields in the final pipe have to correspond to the column names in the DB table. Example usage: case object YourTableSource extends JDBCSource { override val tableName = "tableName" override val columns = List( varchar("col1", 64), date("col2"), tinyint("col3"), double("col4"), ) override def currentConfig = ConnectionSpec("www.github.com", "username", "password", "mysql") }

Linear Supertypes
Source, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JDBCSource
  2. Source
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JDBCSource()

Abstract Value Members

  1. abstract val columns: Iterable[ColumnDefinition]

  2. abstract def currentConfig: ConnectionSpec

    Attributes
    protected
  3. abstract val tableName: String

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def batchSize: Int

  8. def bigint(name: String, size: Int = 20, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  9. def checkFlowDefNotNull(implicit flowDef: FlowDef, mode: Mode): Unit

    Attributes
    protected
    Definition Classes
    Source
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def column(name: String, definition: String): ColumnDefinition

    Attributes
    protected
  12. def columnDefinitions: Array[String]

    Attributes
    protected
  13. def columnNames: Array[String]

    Attributes
    protected
  14. def createJDBCTap: JDBCTap

    Attributes
    protected
  15. def createTap(readOrWrite: AccessMode)(implicit mode: Mode): Tap[_, _, _]

    Definition Classes
    JDBCSource → Source
  16. def date(name: String, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  17. def datetime(name: String, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  18. def double(name: String, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  19. def driverFor(adapter: String): String

    Attributes
    protected
  20. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  22. def fields: Fields

  23. val filterCondition: Option[String]

  24. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  26. def getJDBCScheme: JDBCScheme

    Attributes
    protected
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. def int(name: String, size: Int = 11, defaultValue: Int = 0, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. def maxConcurrentReads: Int

  31. def mkColumnDef(name: String, typeName: String, nullable: Boolean, sizeOp: Option[Int] = None, defOp: Option[String]): ColumnDefinition

    Attributes
    protected
  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. def nullStr(nullable: Boolean): String

    Attributes
    protected
  36. def read(implicit flowDef: FlowDef, mode: Mode): Pipe

    Definition Classes
    Source
  37. def smallint(name: String, size: Int = 6, defaultValue: Int = 0, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def tableDesc: TableDesc

    Attributes
    protected
  40. def text(name: String, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  41. def tinyint(name: String, size: Int = 8, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  42. def toSqlCreateString: String

  43. def toString(): String

    Definition Classes
    AnyRef → Any
  44. def transformForRead(pipe: Pipe): Pipe

    Attributes
    protected
    Definition Classes
    Source
  45. def transformForWrite(pipe: Pipe): Pipe

    Attributes
    protected
    Definition Classes
    Source
  46. def transformInTest: Boolean

    Definition Classes
    Source
  47. val updateBy: Iterable[String]

  48. def validateTaps(mode: Mode): Unit

    Definition Classes
    Source
  49. def varchar(name: String, size: Int = 255, nullable: Boolean = false): ColumnDefinition

    Attributes
    protected
  50. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def writeFrom(pipe: Pipe)(implicit flowDef: FlowDef, mode: Mode): Pipe

    Definition Classes
    Source

Deprecated Value Members

  1. def readAtSubmitter[T](implicit mode: Mode, conv: TupleConverter[T]): Stream[T]

    Definition Classes
    Source
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.0) replace with Mappable.toIterator

Inherited from Source

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped