public void createMapping() throws HBqlException {
// START SNIPPET: create-mapping1
HConnection conn = HConnectionManager.newConnection();
// Mapping named foo that corresponds to table foo.
conn.execute("CREATE TEMP MAPPING foo (keyval key, family1 (val1 STRING))");
// END SNIPPET: create-mapping1
// START SNIPPET: create-mapping2
// Mapping named mapping1 that corresponds to table foo.
conn.execute("CREATE MAPPING mapping1 FOR TABLE foo (keyval key, family1 (val1 STRING ALIAS val2))");
// END SNIPPET: create-mapping2
// START SNIPPET: create-mapping3
// A column with a default value.
conn.execute("CREATE MAPPING mapping1 FOR TABLE foo "
+ "("
+ "keyval key, "
+ "family1 (val1 STRING ALIAS val1 DEFAULT 'this is a default value')"
+ ")");
// END SNIPPET: create-mapping3
// START SNIPPET: create-mapping4
// A Mapping with a with an INCLUDE UNMAPPED clause.
conn.execute("CREATE TEMP MAPPING mapping1 FOR TABLE foo "
+ "("
+ "keyval key, "
+ "family1 INCLUDE UNMAPPED ("
+ " val1 STRING ALIAS val1, "
+ " val2 STRING ALIAS val3 "