private void addAllDirectAttributesToFlattenedListFromCube(ObjectFactory objectFactory, CubeInterface cube, List<XFlattenedColumn> columnList) { AbstractBaseTable baseTbl = (AbstractBaseTable) (cube instanceof DerivedCube ? ((DerivedCube) cube).getParent() : cube); for (CubeDimAttribute dim : cube.getDimAttributes()) { XFlattenedColumn fcol = objectFactory.createXFlattenedColumn(); fcol.setDimAttribute(JAXBUtils.xDimAttrFromHiveDimAttr(dim, baseTbl)); fcol.setTableName(cube.getName()); columnList.add(fcol); } }
private void addAllDirectAttributesToFlattenedListFromDimension(ObjectFactory objectFactory, Dimension dimension, List<XFlattenedColumn> columnList, String chainName) { for (CubeDimAttribute cd : dimension.getAttributes()) { XFlattenedColumn fcol = objectFactory.createXFlattenedColumn(); fcol.setDimAttribute(JAXBUtils.xDimAttrFromHiveDimAttr(cd, dimension)); fcol.setTableName(dimension.getName()); if (chainName != null) { fcol.setChainName(chainName); } columnList.add(fcol); } }
public static XDimension xdimensionFromDimension(Dimension dimension) { XDimension xd = XCF.createXDimension(); xd.setName(dimension.getName()); xd.setAttributes(new XDimAttributes()); xd.setExpressions(new XExpressions()); xd.setJoinChains(new XJoinChains()); xd.setProperties(new XProperties()); xd.getProperties().getProperty().addAll(xPropertiesFromMap(((AbstractCubeTable) dimension).getProperties())); for (CubeDimAttribute cd : dimension.getAttributes()) { xd.getAttributes().getDimAttribute().add(xDimAttrFromHiveDimAttr(cd, dimension)); } for (ExprColumn ec : dimension.getExpressions()) { xd.getExpressions().getExpression().add(xExprColumnFromHiveExprColumn(ec)); } for (JoinChain jc : dimension.getJoinChains()) { xd.getJoinChains().getJoinChain().add(getXJoinChainFromJoinChain(jc)); } return xd; }
public static XDimension xdimensionFromDimension(Dimension dimension) { XDimension xd = XCF.createXDimension(); xd.setName(dimension.getName()); xd.setAttributes(new XDimAttributes()); xd.setExpressions(new XExpressions()); xd.setJoinChains(new XJoinChains()); xd.setProperties(new XProperties()); xd.getProperties().getProperty().addAll(xPropertiesFromMap(((AbstractCubeTable) dimension).getProperties())); for (CubeDimAttribute cd : dimension.getAttributes()) { xd.getAttributes().getDimAttribute().add(xDimAttrFromHiveDimAttr(cd, dimension)); } for (ExprColumn ec : dimension.getExpressions()) { xd.getExpressions().getExpression().add(xExprColumnFromHiveExprColumn(ec)); } for (JoinChain jc : dimension.getJoinChains()) { xd.getJoinChains().getJoinChain().add(getXJoinChainFromJoinChain(jc)); } return xd; }
XDimAttributes hierarchy = new XDimAttributes(); for (CubeDimAttribute hdDim : hd.getHierarchy()) { hierarchy.getDimAttribute().add(xDimAttrFromHiveDimAttr(hdDim, baseTable));
XDimAttributes hierarchy = new XDimAttributes(); for (CubeDimAttribute hdDim : hd.getHierarchy()) { hierarchy.getDimAttribute().add(xDimAttrFromHiveDimAttr(hdDim, baseTable));
xbc.getDimAttributes().getDimAttribute().add(xDimAttrFromHiveDimAttr(cd, (Cube) c));
xbc.getDimAttributes().getDimAttribute().add(xDimAttrFromHiveDimAttr(cd, (Cube) c));