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