Summary: How to use the Mapper to create a new table in the target data warehouse and then map event types to it.
If the table to which you'd like to map your event type does not yet exist in the target data warehouse, then it is easy to use Alooma to create the target data warehouse table.
In the Mapper, select an event type from the list.
Map the event fields manually by typing in column names and choosing the data type from the type drop-down, or use Alooma’s auto-mapper to quickly map all the event fields.
Click Auto-mapping at the top of the Mapper to automatically assign a unique and appropriate column name for the target database. This name is based on the current event field’s name and the target data warehouse's naming conventions.
For example, for Redshift, @test is changed to test and /test to test_1 (because test is already in use).
The event field is also assigned an appropriate data type. Alooma uses advanced data-type detection heuristics to infer the column data type based on the event field’s values, or the input's schema, if it has one.
Discard all the event fields that you do not want replicated into the target database by clicking the dot to the left of the field name. The dot then turns gray.
If you've chosen to auto-map, you can change the Target Column Name and the Target Data Type, as needed.
Alooma offers a menu of other data types from which you can select, populated based on the types available from your target data warehouse.
The varchar data type provides a Truncate option, which truncates event field values that are longer than the specified number of characters. When the Truncate option is not selected, events with longer field values get a type conversion error and are sent to the Restream queue.
After you map or discard an event field, a Clear button appears at the end of that row which enables you to unmap that field. The field becomes red again and the previous mapping is removed.
Select the Create a table option in the table selection drop-down to create a new table in your target data warehouse. For data warehouses that support schemas (like Redshift and Snowflake), the table drop-down will be preceded by a schema drop-down where you can choose or create a schema for the table to be created in.
Enter the table name to be created in your target database. The name must abide by your target data warehouse's naming restrictions. For example, for Redshift tables, the table’s name may contain lowercase letters, numbers, an _ (underscore) and a $.
A row is displayed for each column that you defined in the mapping. For each column, you can select the relevant target database column properties, as they apply for your target data warehouse. For example, for Redshift, you can choose if a column is a Primary, Sort or Dist. You can also change the order by clicking and dragging on column names. You can add additional columns in this screen by entering a column name, selecting a data type and then clicking the + button.
Click Create Table. Alooma automatically creates this table in the target data warehouse and this table is automatically selected in the drop-down.
Once a table has been created in the target data warehouse, the data type of its columns cannot be changed. Newly appearing event fields will be added as new fields to the target data warehouse.
The mapping of a specific event type can be considered complete after all its non-metadata fields are either Mapped or Discarded and the event type dot in the left pane has turned green. You can leave some of the event fields unmapped, if Alooma’s Mapper configuration for handling unmapped event fields is set to Flexible or Auto-mapped mode. If Alooma is set to Strict mode, then unmapped event fields cause an event to be sent to the Restream queue (and not loaded into the target database).
Click Apply to apply these changes to Alooma. Data that is already in the target is not affected by mapping changes.
Before clicking Apply, you can cancel the latest changes by clicking Discard.
After making mapping changes, we recommend monitoring the Alooma Notification pane in the Dashboard, as well as the Restream queue in order to check whether Alooma has detected issues that require handling caused by the new mapping.