hierarchy.add(hiveDimAttrFromXDimAttr(hd)); hiveDim = new HierarchicalDimAttribute(xd.getName(), xd.getDescription(), hierarchy); } else if (xd.getChainRefColumn() != null && !xd.getChainRefColumn().isEmpty()) { hiveDim = new ReferencedDimAttribute(new FieldSchema(xd.getName(), xd.getType().toLowerCase(), xd.getDescription()), xd.getDisplayString(), ); } else { hiveDim = new BaseDimAttribute(new FieldSchema(xd.getName(), xd.getType().toLowerCase(), xd.getDescription()), xd.getDisplayString(),
hierarchy.add(hiveDimAttrFromXDimAttr(hd)); hiveDim = new HierarchicalDimAttribute(xd.getName(), xd.getDescription(), hierarchy); } else if (xd.getChainRefColumn() != null && !xd.getChainRefColumn().isEmpty()) { hiveDim = new ReferencedDimAttribute(new FieldSchema(xd.getName(), xd.getType().toLowerCase(), xd.getDescription()), xd.getDisplayString(), ); } else { hiveDim = new BaseDimAttribute(new FieldSchema(xd.getName(), xd.getType().toLowerCase(), xd.getDescription()), xd.getDisplayString(),
boolean chainValidated = false; for (XDimAttribute attr : actual.getDimAttributes().getDimAttribute()) { if (attr.getName().equalsIgnoreCase("testdim2col2")) { assertEquals(attr.getChainRefColumn().get(0).getDestTable(), "testdim"); chainValidated = true;
private void populateActualTablesAndCols(List<XFlattenedColumn> columns, Set<String> tables, Set<String> colSet) { for (XFlattenedColumn colObject : columns) { String colStr; tables.add(colObject.getTableName()); if (colObject.getMeasure() != null) { colStr = colObject.getTableName() + "." + colObject.getMeasure().getName(); } else if (colObject.getDimAttribute() != null) { colStr = (colObject.getChainName() != null ? colObject.getChainName() + "-" : "") + colObject.getTableName() + "." + colObject.getDimAttribute().getName(); } else { // it will be expression colStr = (colObject.getChainName() != null ? colObject.getChainName() + "-" : "") + colObject.getTableName() + "." + colObject.getExpression().getName(); } colSet.add(colStr); } }