public XColumn withType(String value) { setType(value); return this; }
public XColumn withType(String value) { setType(value); return this; }
public static XColumn createXColumn(final String colName) { XColumn xCol = new XColumn(); xCol.setName(colName); xCol.setType("STRING"); return xCol; } }
public static XColumn columnFromFieldSchema(FieldSchema fs) { if (fs == null) { return null; } XColumn c = XCF.createXColumn(); c.setName(fs.getName()); c.setType(fs.getType()); c.setComment(fs.getComment()); return c; }
public static XColumn columnFromFieldSchema(FieldSchema fs) { if (fs == null) { return null; } XColumn c = XCF.createXColumn(); c.setName(fs.getName()); c.setType(fs.getType()); c.setComment(fs.getComment()); return c; }
c.setType("STRING"); c.setComment("Added column"); dt2.getColumns().getColumn().add(c);
XColumn partCol = cubeObjectFactory.createXColumn(); partCol.setName(timePartColName); partCol.setType("STRING"); partCol.setComment("partition column"); xs1.getPartCols().getColumn().add(partCol);
private XFactTable createFactTable(String factName, final String cubeName) { XFactTable f = cubeObjectFactory.createXFactTable(); f.setColumns(new XColumns()); f.setProperties(new XProperties()); f.setStorageTables(new XStorageTables()); f.setName(factName); f.setWeight(10.0); f.setCubeName(cubeName); XColumn c1 = cubeObjectFactory.createXColumn(); c1.setName("c1"); c1.setType("STRING"); c1.setComment("col1"); f.getColumns().getColumn().add(c1); XColumn c2 = cubeObjectFactory.createXColumn(); c2.setName("c2"); c2.setType("STRING"); c2.setComment("col2"); f.getColumns().getColumn().add(c2); XColumn c3 = cubeObjectFactory.createXColumn(); c3.setName("c3"); c3.setType("STRING"); c3.setComment("col3"); c3.setStartTime("2016-01-01"); c3.setEndTime("2017-01-01"); f.getColumns().getColumn().add(c3); Map<String, String> properties = LensUtil.getHashMap("foo", "bar"); f.getProperties().getProperty().addAll(JAXBUtils.xPropertiesFromMap(properties)); return f; }
private XDimensionTable createDimTable(String dimName, String table) { XDimensionTable dt = cubeObjectFactory.createXDimensionTable(); dt.setDimensionName(dimName); dt.setTableName(table); dt.setWeight(15.0); dt.setColumns(new XColumns()); dt.setProperties(new XProperties()); dt.setStorageTables(new XStorageTables()); XColumn c1 = cubeObjectFactory.createXColumn(); c1.setName("col1"); c1.setType("STRING"); c1.setComment("Fisrt column"); dt.getColumns().getColumn().add(c1); XColumn c2 = cubeObjectFactory.createXColumn(); c2.setName("col2"); c2.setType("INT"); c2.setComment("Second column"); dt.getColumns().getColumn().add(c2); XProperty p1 = cubeObjectFactory.createXProperty(); p1.setName("foodim"); p1.setValue("bardim"); dt.getProperties().getProperty().add(p1); return dt; }