In this example, the tFilterRow component has
two output flows, one for accepted records, which has the same schema
structure as defined in the previous component, tFilterColumns, and the other for rejected records, which has
one more column, errorMessage. The
errorMessage column is mandatory for the reject
flow and it has fixed properties - even if you don't define this column, the
Studio will automatically add it when generating the Job.
// define the schema for the accepted records
addSchema {
NAME: "ACCEPT",
CONNECTOR: "FILTER"
addColumn {
NAME: "name",
TYPE: "id_String"
}
addColumn {
NAME: "gender",
TYPE: "id_String"
}
addColumn {
NAME: "age",
TYPE: "id_Integer",
LENGTH: 2
}
addColumn {
NAME: "city",
TYPE: "id_String"
}
}
// define the schema for the rejected records
addSchema {
NAME: "REJECT",
CONNECTOR: "REJECT"
addColumn {
NAME: "name",
TYPE: "id_String"
}
addColumn {
NAME: "gender",
TYPE: "id_String"
}
addColumn {
NAME: "age",
TYPE: "id_Integer",
LENGTH: 2
}
addColumn {
NAME: "city",
TYPE: "id_String"
}
addColumn {
NAME: "errorMessage",
TYPE: "id_String",
NULLABLE: true,
LENGTH: 255,
PRECISION: 0
}
}