/** * Is the table name passed a dimension table? * * @param tableName table name * @return true if it is cube dimension, false otherwise * @throws LensException */ public boolean isDimensionTable(String tableName) throws LensException { Table tbl = getTable(tableName); return isDimensionTable(tbl); }
/** * Is the table name passed a dimension table? * * @param tableName table name * @return true if it is cube dimension, false otherwise * @throws LensException */ public boolean isDimensionTable(String tableName) throws LensException { Table tbl = getTable(tableName); return isDimensionTable(tbl); }
boolean latestPartitionExists(String factOrDimTblName, String storageName, String latestPartCol) throws HiveException, LensException { String storageTableName = MetastoreUtil.getStorageTableName(factOrDimTblName, Storage.getPrefix(storageName)); if (isDimensionTable(factOrDimTblName)) { return dimTableLatestPartitionExists(storageTableName); } else { return !partitionTimelineCache.noPartitionsExist(factOrDimTblName, storageName, latestPartCol); } }
boolean latestPartitionExists(String factOrDimTblName, String storageName, String latestPartCol) throws HiveException, LensException { String storageTableName = MetastoreUtil.getStorageTableName(factOrDimTblName, Storage.getPrefix(storageName)); if (isDimensionTable(factOrDimTblName)) { return dimTableLatestPartitionExists(storageTableName); } else { return !partitionTimelineCache.noPartitionsExist(factOrDimTblName, storageName, latestPartCol); } }
if (isDimensionTable(cubeTableName)) { String timePartColsStr = hiveTable.getTTable().getParameters().get(MetastoreConstants.TIME_PART_COLUMNS); Map<String, LatestInfo> latest = new HashMap<>();
if (isDimensionTable(cubeTableName)) { String timePartColsStr = hiveTable.getTTable().getParameters().get(MetastoreConstants.TIME_PART_COLUMNS); Map<String, LatestInfo> latest = new HashMap<>();
assertTrue(client.isDimensionTable(cubeTbl));
assertTrue(client.isDimensionTable(cubeTbl));
assertTrue(client.tableExists(dimName)); Table cubeTbl = client.getHiveTable(dimName); assertTrue(client.isDimensionTable(cubeTbl)); CubeDimensionTable cubeDim2 = new CubeDimensionTable(cubeTbl); assertTrue(cubeDim.equals(cubeDim2));
assertTrue(client.isDimensionTable(cubeTbl));
assertTrue(client.isDimensionTable(cubeTbl));