use of com.thinkbiganalytics.util.TableType in project kylo by Teradata.
the class TableRegisterSupport method registerStandardTables.
public boolean registerStandardTables(String source, String tableEntity, ColumnSpec[] feedColumnSpecs, String feedFormatOptions, String targetFormatOptions, ColumnSpec[] partitions, ColumnSpec[] columnSpecs, String tblProperties) {
boolean result = true;
registerDatabase(source);
Set<String> existingTables = fetchExisting(source, tableEntity);
TableType[] tableTypes = new TableType[] { TableType.FEED, TableType.INVALID, TableType.VALID, TableType.MASTER };
for (TableType tableType : tableTypes) {
if (!existingTables.contains(tableType.deriveTablename(tableEntity))) {
result = registerTable(source, tableEntity, feedColumnSpecs, feedFormatOptions, targetFormatOptions, partitions, columnSpecs, tblProperties, tableType, false) && result;
}
}
if (!existingTables.contains(TableType.PROFILE.deriveTablename(tableEntity))) {
result = registerProfileTable(source, tableEntity, targetFormatOptions) && result;
}
return result;
}
Aggregations