com.twitter.scalding.jdbc

JDBCSource

Related Doc: package jdbc

abstract class JDBCSource extends Source with ColumnDefiner with JdbcDriver

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("tableName") override val columns = List( varchar("col1", 64), date("col2"), tinyint("col3"), double("col4") ) override def currentConfig = ConnectionSpec( ConnectUrl("jdbc:mysql://mysql01.company.com:3306/production"), UserName("username"), Password("password"), MysqlDriver ) }

Linear Supertypes
JdbcDriver, ColumnDefiner, Source, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JDBCSource
  2. JdbcDriver
  3. ColumnDefiner
  4. Source
  5. Serializable
  6. AnyRef
  7. 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]

    Definition Classes
    JDBCSourceColumnDefiner
  2. abstract def currentConfig: ConnectionSpec

    Attributes
    protected
  3. abstract def driver: DriverClass

    Definition Classes
    JdbcDriver
  4. abstract val tableName: TableName

Concrete Value Members

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

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

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

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

    Definition Classes
    Any
  5. def batchSize: Int

  6. def bigint(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[BIGINT.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  7. def checkFlowDefNotNull(implicit flowDef: FlowDef, mode: Mode): Unit

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def columnDefinitions: Array[Definition]

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  10. def columnNames: Array[ColumnName]

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  11. def createJDBCTap: JDBCTap

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

    Definition Classes
    JDBCSource → Source
  13. def date(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[DATE.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  14. def datetime(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[DATETIME.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  15. def double(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[DOUBLE.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  16. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  18. def fields: Fields

  19. val filterCondition: Option[String]

  20. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  22. def getJDBCScheme(columnNames: Array[ColumnName], filterCondition: Option[String], updateBy: Iterable[String], replaceOnInsert: Boolean): JDBCScheme

    Definition Classes
    JdbcDriver
  23. def getTableDesc(tableName: TableName, columnNames: Array[ColumnName], columnDefinitions: Array[Definition]): TableDesc

    Definition Classes
    JdbcDriver
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. def int(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[INT.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def maxConcurrentReads: Int

  28. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  31. def read(implicit flowDef: FlowDef, mode: Mode): Pipe

    Definition Classes
    Source
  32. val replaceOnInsert: Boolean

  33. def smallint(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[SMALLINT.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  34. def sourceId: String

    Definition Classes
    Source
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def text(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[TEXT.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  37. def tinyint(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[TINYINT.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  38. def toSqlCreateString: String

  39. def toString(): String

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

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

    Attributes
    protected
    Definition Classes
    Source
  42. def transformInTest: Boolean

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

  44. def validateTaps(mode: Mode): Unit

    Definition Classes
    Source
  45. def varchar(name: String, nullable: IsNullable = NotNullable)(implicit coldef: DriverColumnDefiner[VARCHAR.type]): ColumnDefinition

    Attributes
    protected
    Definition Classes
    ColumnDefiner
  46. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. 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 JdbcDriver

Inherited from ColumnDefiner

Inherited from Source

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped