Class SQLDataSource<T extends Output<T>>

java.lang.Object
org.tribuo.data.columnar.ColumnarDataSource<T>
org.tribuo.data.sql.SQLDataSource<T>
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<DataSourceProvenance>, AutoCloseable, Iterable<Example<T>>, ConfigurableDataSource<T>, DataSource<T>

public class SQLDataSource<T extends Output<T>> extends ColumnarDataSource<T> implements AutoCloseable
A DataSource for loading columnar data from a database and applying FieldProcessors to it. The Connections it creates are closed when the iterator is empty (ie. when hasNext is called and returns false). Calling close() on SQLDatasource itself closes all connections created since close was last called.

N.B. This class accepts raw SQL strings and executes them directly via JDBC. It DOES NOT perform any SQL escaping or other injection prevention. It is the user's responsibility to ensure that SQL passed to this class performs as desired.