PowerExchange for Cassandra User Guide

PowerExchange for Cassandra User Guide

Virtual Tables

Virtual Tables

The Informatica Cassandra ODBC driver creates virtual tables if the column family contains collections such as set, list, or map.
Virtual tables depict the normalized view of a Cassandra collection. You can import virtual tables as an ODBC data object and create mappings. The Informatica Cassandra ODBC driver creates a virtual table for each collection in the column family. The virtual table for a collection uses the following naming convention by default:
<original column family name>_vt_<original collection name>
Each virtual table has a key column that references back to the primary key column in the original column family. The virtual table has an index column that shows the position of the data within the original array. The index column uses the following naming convention by default:
<original column name>_index
. Other columns in the virtual table represent the elements in the array and are named after the array element. If the array is of scalar type, the data column uses the following naming convention by default:
<original column name>_value

Example

The following CQL statement defines a Cassandra column family that contains a set:
CREATE TABLE users_list( username text PRIMARY KEY, first_name text, last_name text, city text, last_login timestamp, emails set<text> );
When you use the Informatica Cassandra ODBC driver to import the column family, the driver creates the users_list_vt_emails virtual table for the users_list table.
The following table shows the denormalized view of the users_list_vt_emails virtual table:
username
emails_value
user1
xyz@gmail.com
user1
abc@hotmail.com
user1
qwe@yahoo.com
user2
zxc@gmail.com
user2
jkl@hotmail.com

0 COMMENTS

We’d like to hear from you!