public List<Schema> getSchemas() { return new ArrayList<Schema>(this.store.getSchemaList()); }
private static Table findTableByName(MetadataStore store, String name) { Table table = null; int index = name.indexOf(Table.NAME_DELIM_CHAR); if(index == -1) { for(Schema schema : store.getSchemaList()) { table = schema.getTable(name); if(table != null) { break; } } } else { String schemaName = name.substring(0, index); Schema schema = store.getSchema(schemaName); if(schema != null) { table = schema.getTable(name.substring(index+1)); } } return table; }
public void merge(MetadataStore store) { if (store != null) { for (Schema s:store.getSchemaList()) { addSchema(s); } addDataTypes(store.getDatatypes()); addGrants(store.grants.values()); roles.putAll(store.roles); } }
private Table findTable(String tableName, MetadataStore store) { int idx = tableName.indexOf('.'); if (idx > 0) { Schema s = store.getSchema(tableName.substring(0, idx)); if (s != null) { Table t = s.getTable(tableName.substring(idx+1)); if (t != null) { return t; } } } for (Schema s : store.getSchemaList()) { Table t = s.getTables().get(tableName); if (t != null) { return t; } } return null; } //TODO: allow the generated key building.
private static Table findTableByName(MetadataStore store, String name) { Table table = null; int index = name.indexOf(Table.NAME_DELIM_CHAR); if(index == -1) { for(Schema schema : store.getSchemaList()) { table = schema.getTable(name); if(table != null) { break; } } } else { String schemaName = name.substring(0, index); Schema schema = store.getSchema(schemaName); if(schema != null) { table = schema.getTable(name.substring(index+1)); } } return table; }
private static Table findTableByName(MetadataStore store, String name) { Table table = null; int index = name.indexOf(Table.NAME_DELIM_CHAR); if(index == -1) { for(Schema schema : store.getSchemaList()) { table = schema.getTable(name); if(table != null) { break; } } } else { String schemaName = name.substring(0, index); Schema schema = store.getSchema(schemaName); if(schema != null) { table = schema.getTable(name.substring(index+1)); } } return table; }
static EdmDataServices buildMetadata(MetadataStore metadataStore) { try { List<EdmSchema.Builder> edmSchemas = new ArrayList<EdmSchema.Builder>(); for (Schema schema:metadataStore.getSchemaList()) { buildEntityTypes(schema, edmSchemas, true); buildFunctionImports(schema, edmSchemas, true); buildAssosiationSets(schema, edmSchemas, true); } return EdmDataServices.newBuilder().addSchemas(edmSchemas).build(); } catch (Exception e) { throw new TeiidRuntimeException(e); } }
private void doMaterializationActions(VDBMetaData vdb, MaterializationAction action) { TransformationMetadata metadata = vdb.getAttachment(TransformationMetadata.class); if (metadata == null) { return; } Set<String> imports = vdb.getImportedModels(); MetadataStore store = metadata.getMetadataStore(); // schedule materialization loads and do the start actions for (Schema schema : store.getSchemaList()) { if (imports.contains(schema.getName())) { continue; } for (Table table:schema.getTables().values()) { // find external matview table if (!table.isVirtual() || !table.isMaterialized() || !Boolean.valueOf(table.getProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, false))) { continue; } action.process(table); } } }
for (Schema s : client.getMetadataStore().getSchemaList()) { if (!isVisible(vdb, s)) { continue; for (Schema s : client.getMetadataStore().getSchemaList()) { if (!isVisible(vdb, s)) { continue;
List<Schema> schemas = mergedStore.getSchemaList(); schemas.clear(); for (ModelMetaData model : this.vdb.getModelMetaDatas().values()) {
public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); } return report; }
public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); } return report; }
public ValidatorReport validate(VDBMetaData vdb, MetadataStore store) { ValidatorReport report = new ValidatorReport(); if (store != null && !store.getSchemaList().isEmpty()) { new SourceModelArtifacts().execute(vdb, store, report, this); new CrossSchemaResolver().execute(vdb, store, report, this); new ResolveQueryPlans().execute(vdb, store, report, this); new MinimalMetadata().execute(vdb, store, report, this); new MatViewPropertiesValidator().execute(vdb, store, report, this); } return report; }
@Override public void execute(VDBMetaData vdb, MetadataStore store, ValidatorReport report, MetadataValidator metadataValidator) { for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;
@Override public void execute(VDBMetaData vdb, MetadataStore store, ValidatorReport report, MetadataValidator metadataValidator) { for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;
@Override public void execute(VDBMetaData vdb, MetadataStore store, ValidatorReport report, MetadataValidator metadataValidator) { for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;
@Override public void execute(VDBMetaData vdb, MetadataStore store, ValidatorReport report, MetadataValidator metadataValidator) { for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;
@Override public void execute(VDBMetaData vdb, MetadataStore store, ValidatorReport report, MetadataValidator metadataValidator) { for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;
QueryMetadataInterface metadata = vdb.getAttachment(QueryMetadataInterface.class); metadata = new TempMetadataAdapter(metadata, new TempMetadataStore()); for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;
QueryMetadataInterface metadata = vdb.getAttachment(QueryMetadataInterface.class); metadata = new TempMetadataAdapter(metadata, new TempMetadataStore()); for (Schema schema:store.getSchemaList()) { if (vdb.getImportedModels().contains(schema.getName())) { continue;