use of org.apache.apex.malhar.sql.table.FileEndpoint in project apex-malhar by apache.
the class SQLApplicationWithAPI method populateDAG.
@Override
public void populateDAG(DAG dag, Configuration conf) {
// Source definition
String schemaInName = conf.get("csvSchemaInName");
String schemaIn = conf.get("csvSchemaIn");
String sourceFile = conf.get("sourceFile");
SQLExecEnvironment.getEnvironment().registerTable(schemaInName, new FileEndpoint(sourceFile, new CSVMessageFormat(schemaIn))).executeSQL(dag, conf.get("sql"));
}
Aggregations