public void createVirtualFactTable(String cubeName, String virtualFactName, String sourceFactName, Double weight, Map<String, String> properties) throws LensException { FactTable sourceFact = getFactTable(sourceFactName); Optional<Double> optionalWeight = Optional.fromNullable(weight); CubeVirtualFactTable factTable = new CubeVirtualFactTable(cubeName, virtualFactName, optionalWeight, properties, sourceFact); createCubeTable(factTable, null); // do a get to update cache getFactTable(virtualFactName); }
public void createVirtualFactTable(String cubeName, String virtualFactName, String sourceFactName, Double weight, Map<String, String> properties) throws LensException { FactTable sourceFact = getFactTable(sourceFactName); checkIfAuthorized(); Optional<Double> optionalWeight = Optional.fromNullable(weight); CubeVirtualFactTable factTable = new CubeVirtualFactTable(cubeName, virtualFactName, optionalWeight, properties, sourceFact); createCubeTable(factTable, null); // do a get to update cache getFactTable(virtualFactName); }
String sourceFactName = tbl.getParameters().get(getSourceFactNameKey(tbl.getTableName())); if (sourceFactName != null) { fact = new CubeVirtualFactTable(tbl, getCubeFactTable(sourceFactName)); if (factToVirtualFactMapping.get(sourceFactName) != null) { List<String> prevList = factToVirtualFactMapping.get(sourceFactName);
String sourceFactName = tbl.getParameters().get(getSourceFactNameKey(tbl.getTableName())); if (sourceFactName != null) { fact = new CubeVirtualFactTable(tbl, getCubeFactTable(sourceFactName)); if (factToVirtualFactMapping.get(sourceFactName) != null) { List<String> prevList = factToVirtualFactMapping.get(sourceFactName);
private void updateFactCache(String factTableName) throws LensException { if (enableCaching) { Table factTbl = getTableWithTypeFailFast(factTableName, CubeTableType.FACT); FactTable refreshedTable; if (factTbl.getParameters().get(getSourceFactNameKey(factTableName)) != null) { String sourceFactName = factTbl.getParameters().get(getSourceFactNameKey(factTableName)); refreshedTable = new CubeVirtualFactTable(refreshTable(factTableName), getCubeFactTable(sourceFactName)); } else { refreshedTable = new CubeFactTable(refreshTable(factTableName)); } allFactTables.put(factTableName.trim().toLowerCase(), refreshedTable); } }
private FactTable getFactTable(Table tbl) throws LensException { String sourceFact = tbl.getParameters().get(getSourceFactNameKey(tbl.getTableName())); if (sourceFact != null) { return new CubeVirtualFactTable(tbl, getCubeFactTable(sourceFact)); } else { return new CubeFactTable(tbl); } }
private void updateFactCache(String factTableName) throws LensException { if (enableCaching) { Table factTbl = getTableWithTypeFailFast(factTableName, CubeTableType.FACT); FactTable refreshedTable; if (factTbl.getParameters().get(getSourceFactNameKey(factTableName)) != null){ String sourceFactName = factTbl.getParameters().get(getSourceFactNameKey(factTableName)); refreshedTable = new CubeVirtualFactTable(refreshTable(factTableName), getCubeFactTable(sourceFactName)); }else { refreshedTable = new CubeFactTable(refreshTable(factTableName)); } allFactTables.put(factTableName.trim().toLowerCase(), refreshedTable); } }
private FactTable getFactTable(Table tbl) throws LensException { String sourceFact = tbl.getParameters().get(getSourceFactNameKey(tbl.getTableName())); if (sourceFact != null) { return new CubeVirtualFactTable(tbl, getCubeFactTable(sourceFact)); } else { return new CubeFactTable(tbl); } }
public static CubeVirtualFactTable cubeVirtualFactFromFactTable(XVirtualFactTable fact, FactTable sourceFactTable) throws LensException { Optional<Double> optionalWeight = Optional.fromNullable(fact.getWeight()); return new CubeVirtualFactTable(fact.getCubeName(), fact.getName(), optionalWeight, mapFromXProperties(fact.getProperties()), sourceFactTable); }
public static CubeVirtualFactTable cubeVirtualFactFromFactTable(XVirtualFactTable fact, FactTable sourceFactTable) throws LensException { Optional<Double> optionalWeight = Optional.fromNullable(fact.getWeight()); return new CubeVirtualFactTable(fact.getCubeName(), fact.getName(), optionalWeight, mapFromXProperties(fact.getProperties()), sourceFactTable); }
CubeVirtualFactTable cubeVirtualFact = new CubeVirtualFactTable(VIRTUAL_CUBE_NAME, virtualFactName, com.google.common.base.Optional.fromNullable(null), virtualFactPropertiesMap, sourceFact); cubeVirtualFact = new CubeVirtualFactTable(VIRTUAL_CUBE_NAME, virtualFactName, com.google.common.base.Optional.fromNullable(null), alterVirtualFactPropertiesMap, sourceFact);