After playing with the code some more, I think that lacking an additional data type in Pentaho for UUID, the thing to do would be to add an option to the Cassandra Output step to specify "Check Strings for UUID" and then have code in CassandraUtils - kettleValueToCQL check the setting and then attempt to covert the string to a UUID, and then return the unquoted string or the quoted string depending on success/failure. For example:
Code:
if(checkStringsForUUID) {
try {
// test to see if this string appears to be a UUID and if so, treat it as one and do not quote
java.util.UUID.fromString(cassandraString);
return cassandraString;
} catch (IllegalArgumentException iae) {
return "'" + escapeSingleQuotes(cassandraString) + "'"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
return "'" + escapeSingleQuotes(cassandraString) + "'"; //$NON-NLS-1$ //$NON-NLS-2$
I have added the straight try/catch to my local build and this works as expected.