// Create the long description attribute and set the data type for it.
MdmBaseAttribute chanLongDescAttr = null;
chanLongDescAttr = dimension.findOrCreateBaseAttribute(level.getTableColumnId());
SQLDataType sdtVC2 = new SQLDataType(connection.getDatabaseType(level.getType()));
chanLongDescAttr.setSQLDataType(sdtVC2);
// Make the attribute visible on the dimension.
dimension.setValueDescriptionAttribute(chanLongDescAttr);