/** * Get all dimension tables of the dimension. * * @param dim Dimension object * @return List of fact tables * @throws LensException */ public List<CubeDimensionTable> getAllDimensionTables(Dimension dim) throws LensException { List<CubeDimensionTable> dimTables = new ArrayList<>(); for (CubeDimensionTable dimTbl : getAllDimensionTables()) { if (dim == null || dimTbl.getDimName().equalsIgnoreCase(dim.getName().toLowerCase())) { dimTables.add(dimTbl); } } return dimTables; }
/** * Get all dimension tables of the dimension. * * @param dim Dimension object * @return List of fact tables * @throws LensException */ public List<CubeDimensionTable> getAllDimensionTables(Dimension dim) throws LensException { List<CubeDimensionTable> dimTables = new ArrayList<>(); for (CubeDimensionTable dimTbl : getAllDimensionTables()) { if (dim == null || dimTbl.getDimName().equalsIgnoreCase(dim.getName().toLowerCase())) { dimTables.add(dimTbl); } } return dimTables; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } CubeDimensionTable other = (CubeDimensionTable) obj; if (this.getDimName() == null) { if (other.getDimName() != null) { return false; } } else { if (!this.getDimName().equals(other.getDimName())) { return false; } } if (this.getSnapshotDumpPeriods() == null) { if (other.getSnapshotDumpPeriods() != null) { return false; } } else { if (!this.getSnapshotDumpPeriods().equals(other.getSnapshotDumpPeriods())) { return false; } } return true; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } CubeDimensionTable other = (CubeDimensionTable) obj; if (this.getDimName() == null) { if (other.getDimName() != null) { return false; } } else { if (!this.getDimName().equals(other.getDimName())) { return false; } } if (this.getSnapshotDumpPeriods() == null) { if (other.getSnapshotDumpPeriods() != null) { return false; } } else { if (!this.getSnapshotDumpPeriods().equals(other.getSnapshotDumpPeriods())) { return false; } } return true; }
public CubeDimensionTable(Table tbl) { super(tbl); this.dimName = getDimName(getName(), getProperties()); Map<String, UpdatePeriod> dumpPeriods = getDumpPeriods(getName(), getProperties()); if (dumpPeriods != null) { this.snapshotDumpPeriods.putAll(dumpPeriods); } }
public CubeDimensionTable(Table tbl) { super(tbl); this.dimName = getDimName(getName(), getProperties()); Map<String, UpdatePeriod> dumpPeriods = getDumpPeriods(getName(), getProperties()); if (dumpPeriods != null) { this.snapshotDumpPeriods.putAll(dumpPeriods); } }
storageName); if (dimTableLatestPartitionExistsInMetastore(storageTableName, getDimension(dimTable.getDimName()).getTimedDimension())) { latestLookupCache.add(storageTableName.trim().toLowerCase());
storageName); if (dimTableLatestPartitionExistsInMetastore(storageTableName, getDimension(dimTable.getDimName()).getTimedDimension())) { latestLookupCache.add(storageTableName.trim().toLowerCase());
public static XDimensionTable dimTableFromCubeDimTable(CubeDimensionTable cubeDimTable) { if (cubeDimTable == null) { return null; } XDimensionTable dimTab = XCF.createXDimensionTable(); dimTab.setDimensionName(cubeDimTable.getDimName()); dimTab.setTableName(cubeDimTable.getName()); dimTab.setWeight(cubeDimTable.weight()); dimTab.setColumns(new XColumns()); dimTab.setProperties(new XProperties()); dimTab.setStorageTables(new XStorageTables()); for (FieldSchema column : cubeDimTable.getColumns()) { dimTab.getColumns().getColumn().add(columnFromFieldSchema(column)); } dimTab.getProperties().getProperty().addAll(xPropertiesFromMap(cubeDimTable.getProperties())); return dimTab; }
public static XDimensionTable dimTableFromCubeDimTable(CubeDimensionTable cubeDimTable) { if (cubeDimTable == null) { return null; } XDimensionTable dimTab = XCF.createXDimensionTable(); dimTab.setDimensionName(cubeDimTable.getDimName()); dimTab.setTableName(cubeDimTable.getName()); dimTab.setWeight(cubeDimTable.weight()); dimTab.setColumns(new XColumns()); dimTab.setProperties(new XProperties()); dimTab.setStorageTables(new XStorageTables()); for (FieldSchema column : cubeDimTable.getColumns()) { dimTab.getColumns().getColumn().add(columnFromFieldSchema(column)); } dimTab.getProperties().getProperty().addAll(xPropertiesFromMap(cubeDimTable.getProperties())); return dimTab; }