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("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
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()

Type Members

  1. sealed abstract class IsNullable extends AnyRef

Abstract Value Members

  1. abstract val columns: Iterable[ColumnDefinition]

  2. abstract def currentConfig: ConnectionSpec

    Attributes
    protected
  3. abstract val tableName: TableName

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. object IsNullable

  7. object NotNullable extends IsNullable with Product with Serializable

  8. object Nullable extends IsNullable with Product with Serializable

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def batchSize: Int

  11. def bigint(name: String, size: Int = 20, nullable: IsNullable = NotNullable): ColumnDefinition

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

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

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

    Attributes
    protected
  15. def column(name: String, definition: String): ColumnDefinition

    Attributes
    protected
  16. def columnDefinitions: Array[Definition]

    Attributes
    protected
  17. def columnNames: Array[ColumnName]

    Attributes
    protected
  18. def createJDBCTap: JDBCTap

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

    Definition Classes
    JDBCSource → Source
  20. def date(name: String, nullable: IsNullable = NotNullable): ColumnDefinition

    Attributes
    protected
  21. def datetime(name: String, nullable: IsNullable = NotNullable): ColumnDefinition

    Attributes
    protected
  22. def double(name: String, nullable: IsNullable = NotNullable): ColumnDefinition

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

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

    Definition Classes
    AnyRef → Any
  25. def fields: Fields

  26. val filterCondition: Option[String]

  27. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  29. def getJDBCScheme(driver: JdbcDriver): JDBCScheme

    Attributes
    protected
  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. def int(name: String, size: Int = 11, defaultValue: Int = 0, nullable: IsNullable = NotNullable): ColumnDefinition

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

    Definition Classes
    Any
  33. def maxConcurrentReads: Int

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

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

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

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

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

    Definition Classes
    Source
  39. val replaceOnInsert: Boolean

  40. def smallint(name: String, size: Int = 6, defaultValue: Int = 0, nullable: IsNullable = NotNullable): ColumnDefinition

    Attributes
    protected
  41. def sourceId: String

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

    Definition Classes
    AnyRef
  43. def text(name: String, nullable: IsNullable = NotNullable): ColumnDefinition

    Attributes
    protected
  44. def tinyint(name: String, size: Int = 8, nullable: IsNullable = NotNullable): ColumnDefinition

    Attributes
    protected
  45. def toSqlCreateString: String

  46. def toString(): String

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

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

    Attributes
    protected
    Definition Classes
    Source
  49. def transformInTest: Boolean

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

  51. def validateTaps(mode: Mode): Unit

    Definition Classes
    Source
  52. def varchar(name: String, size: Int = 255, nullable: IsNullable = NotNullable): ColumnDefinition

    Attributes
    protected
  53. final def wait(): Unit

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

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

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