@Override public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException { for (Table table:factory.getSchema().getTables().values()){ if (table.isMaterialized()) { // external materialization if (table.getMaterializedTable() != null) { String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false); if (!Boolean.valueOf(manage)) { continue; } fixScript(ON_VDB_START_SCRIPT, table); fixScript(ON_VDB_DROP_SCRIPT, table); fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table); fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table); fixScript(MATVIEW_LOAD_SCRIPT, table); } else { // internal materialization } } } }
repos.add(new MaterializationMetadataRepository());
@Override public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException { for (Table table:factory.getSchema().getTables().values()){ if (table.isMaterialized()) { // external materialization if (table.getMaterializedTable() != null) { String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false); if (!Boolean.valueOf(manage)) { continue; } fixScript(ON_VDB_START_SCRIPT, table); fixScript(ON_VDB_DROP_SCRIPT, table); fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table); fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table); fixScript(MATVIEW_LOAD_SCRIPT, table); } else { // internal materialization } } } }
@Override public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException { for (Table table:factory.getSchema().getTables().values()){ if (table.isMaterialized()) { // external materialization if (table.getMaterializedTable() != null) { String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false); if (!Boolean.valueOf(manage)) { continue; } fixScript(ON_VDB_START_SCRIPT, table); fixScript(ON_VDB_DROP_SCRIPT, table); fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table); fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table); fixScript(MATVIEW_LOAD_SCRIPT, table); } else { // internal materialization } } } }