-
1. Re: Support for UUID columns in Cassandra Translator
rareddy Apr 26, 2017 11:05 AM (in response to vishnusv)Vishnu,
You are correct, this should have modeled as "string" rather than "object". You can log a JIRA? we will fix. As a workaround, you can add like following to ALTER the metadata
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vdb name="users" version="1"> <property name="cache-metadata" value="true" /> <model name="Users" visible="false"> <source name="cassandra" translator-name="translator-cassandra" connection-jndi-name="java:/demoCassandra" /> <metadata type="DDL"><![CDATA[ ALTER FOREIGN TABLE "Customer" ALTER COLUMN "id" TYPE string; ]]> </metadata> </model> </vdb>
see in above I changed the column "id" type to string. Let us know if that works for you.
Ramesh..
-
2. Re: Support for UUID columns in Cassandra Translator
vishnusv Apr 26, 2017 12:35 PM (in response to rareddy)Ramesh,
Thanks for the recommendation. However TYPE keyword on "ALTER FOREIGN TABLE "Customer" ALTER COLUMN "id" TYPE string;" doesn't seem to be recognized in Teiid 9.1. The documentation seems to suggest that this has been introduced in Teiid 9.2?. I will upgrade to Teiid 9.2 and check this behaviour. Is there an alternative recommendation against Teiid 9.1?.
Thanks,
Vishnu
-
3. Re: Support for UUID columns in Cassandra Translator
rareddy Apr 26, 2017 12:47 PM (in response to vishnusv)Sure, we can kind of workaround with different name for the column name. Try like
ALTER FOREIGN TABLE "Customer" ALTER COLUMN "id" OPTIONS(SET SELECTABLE FALSE)
ALTER FOREIGN TABLE "Customer" ADD COLUMN idtoo varchar(50) OPTIONS(SELECTABLE true, NAMEINSOURCE 'id');
where the first lime makes the previous one not selectable, then second one adds a new column with different name, but NAMEINSOURCE points to original column.