Search in sources :

Example 1 with JdbcFieldInfo

use of org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo in project apex-malhar by apache.

the class StreamingWordExtract method addFieldInfos.

/**
 * Add field infos to the {@link JdbcPOJOInsertOutputOperator}.
 */
private static List<JdbcFieldInfo> addFieldInfos() {
    List<JdbcFieldInfo> fieldInfos = new ArrayList<>();
    fieldInfos.add(new JdbcFieldInfo("STRINGVALUE", "stringValue", JdbcFieldInfo.SupportType.STRING, VARCHAR));
    return fieldInfos;
}
Also used : JdbcFieldInfo(org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo) ArrayList(java.util.ArrayList)

Example 2 with JdbcFieldInfo

use of org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo in project apex-malhar by apache.

the class FileToJdbcCustomParser method addFieldInfos.

/**
 * This method can be modified to have field mappings based on used defined
 * class
 */
private List<JdbcFieldInfo> addFieldInfos() {
    List<JdbcFieldInfo> fieldInfos = Lists.newArrayList();
    fieldInfos.add(new JdbcFieldInfo("ACCOUNT_NO", "accountNumber", JdbcFieldInfo.SupportType.INTEGER, INTEGER));
    fieldInfos.add(new JdbcFieldInfo("NAME", "name", JdbcFieldInfo.SupportType.STRING, VARCHAR));
    fieldInfos.add(new JdbcFieldInfo("AMOUNT", "amount", JdbcFieldInfo.SupportType.INTEGER, INTEGER));
    return fieldInfos;
}
Also used : JdbcFieldInfo(org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo)

Example 3 with JdbcFieldInfo

use of org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo in project apex-malhar by apache.

the class MaxPerKeyExamples method addOutputFieldInfos.

/**
 * Method to set field info for {@link JdbcPOJOInsertOutputOperator}.
 * @return
 */
private List<JdbcFieldInfo> addOutputFieldInfos() {
    List<JdbcFieldInfo> fieldInfos = Lists.newArrayList();
    fieldInfos.add(new JdbcFieldInfo("MONTH", "month", JdbcFieldInfo.SupportType.INTEGER, INTEGER));
    fieldInfos.add(new JdbcFieldInfo("MEANTEMP", "meanTemp", JdbcFieldInfo.SupportType.DOUBLE, DOUBLE));
    return fieldInfos;
}
Also used : JdbcFieldInfo(org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo)

Example 4 with JdbcFieldInfo

use of org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo in project apex-malhar by apache.

the class FileToJdbcCsvParser method addFieldInfos.

/**
 * This method can be modified to have field mappings based on used defined
 * class
 */
private List<JdbcFieldInfo> addFieldInfos() {
    List<JdbcFieldInfo> fieldInfos = Lists.newArrayList();
    fieldInfos.add(new JdbcFieldInfo("ACCOUNT_NO", "accountNumber", JdbcFieldInfo.SupportType.INTEGER, INTEGER));
    fieldInfos.add(new JdbcFieldInfo("NAME", "name", JdbcFieldInfo.SupportType.STRING, VARCHAR));
    fieldInfos.add(new JdbcFieldInfo("AMOUNT", "amount", JdbcFieldInfo.SupportType.INTEGER, INTEGER));
    return fieldInfos;
}
Also used : JdbcFieldInfo(org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo)

Aggregations

JdbcFieldInfo (org.apache.apex.malhar.lib.db.jdbc.JdbcFieldInfo)4 ArrayList (java.util.ArrayList)1