Add Extended Info to the Tutorial Events Table | Vantage Customer Experience - Populate the New Extended Events Table - Vantage Customer Experience

Vantage Customer Experience Path Analysis Tutorial

Product
Vantage Customer Experience
Release Number
1.5
Published
June 2022
Language
English (United States)
Last Update
2022-07-07
dita:mapPath
vkt1594411615815.ditamap
dita:ditavalPath
oyf1565965838286.ditaval
dita:id
vkt1594411615815
Product Category
Teradata Applications

In this section, you'll create a data source to join the data from the the TUTORIAL_CUSTOMER_PROFILE table with the TUTORIAL_CUSTOMER_EVENTS table and populate the extended Events table.

Instructions are provided below for coding manually and by using a data source.
If coding this manually, you'll need the following INSERT statements to join the correct columns from each table:
INSERT INTO "TUTORIAL_CUSTOMER_EXTENDED_EVENTS" 
(
	"entity_id"
	,"event"
	,"datestamp"
	,"age"
	,"region"
	,"voice_calls_avg"
	,"data_usage_avg"
	,"sms_usage_avg"
)
SELECT 
	 "TUTORIAL_CUSTOMER_EVENTS"."entity_id" AS "entity_id"
	,"TUTORIAL_CUSTOMER_EVENTS"."event" AS "event"
	,"TUTORIAL_CUSTOMER_EVENTS"."datestamp" AS "datestamp"
	,"TUTORIAL_CUSTOMER_PROFILE"."age" AS "age"
	,"TUTORIAL_CUSTOMER_PROFILE"."region" AS "region"
	,"TUTORIAL_CUSTOMER_PROFILE"."voice_calls_avg" AS "voice_calls_avg"
	,"TUTORIAL_CUSTOMER_PROFILE"."data_usage_avg" AS "data_usage_avg"
	,"TUTORIAL_CUSTOMER_PROFILE"."sms_usage_avg" AS "sms_usage_avg"
FROM "TUTORIAL_CUSTOMER_PROFILE" AS "TUTORIAL_CUSTOMER_PROFILE"
	INNER JOIN "TUTORIAL_CUSTOMER_EVENTS" AS "TUTORIAL_CUSTOMER_EVENTS"
		ON "TUTORIAL_CUSTOMER_PROFILE"."Entity_Id" = "TUTORIAL_CUSTOMER_EVENTS"."entity_id" 

Here, you'll use a data source to accomplish this without coding:

  1. Select "" > Segmentation > Data soures.
  2. Select Create New > Insert data source.
  3. In the name field, type TUT_EXTENDED_EVENTS.
    vcxTutorial_ruleName
    This data source joins attributes from CUSTOMER_CUSTOMER_PROFILE table to the TUTORIAL_CUSTOMER_EVENTS table.
  4. On the Sources page, select the following:
    Connection The Teradata-Vantage connection you created earlier
    Database The database in which in which you added the sample data
    Table TUTORIAL_CUSTOMER_EVENTS and TUTORIAL_CUSTOMER_PROFILE
    After selecting each table, it moves to the Your selected sources area:
    vcxTutorial_ruleNameSelected
  5. Select Continue.
  6. On the Joins page, select and drag the connector from the TUTORIAL_CUSTOMER_EVENTS table to the TUTORIAL_CUSTOMER_PROFILE table.
    vcxTutorial_dragJoin
  7. On the Edit join page:
    1. Select Inner join.
    2. Select the TUTORIAL_CUSTOMER_EVENTS field and choose entity_id.
    3. Select the TUTORIAL_CUSTOEMR_PROFILES field and choose Entity_id.
    4. Select Save Join.
    vcxTutorial_EditJoin
    The Joins page should look similar to this:
    vcxTutorial_Join
  8. Select Continue.
  9. On the Map and Calculate page, select the following:
    Database The database in which you created the Events table
    Table TUTORIAL_CUSTOMER_EXTENDED_EVENTS
  10. Click Select Table.
  11. In the Map columns area, map each field from the source table to the destination table, as shown here:
    Source table and field field Destination field (in

    TUTORIAL_CUSTOMER_EXTENDED_EVENTS

    table)
    "TUTORIAL_CUSTOMER_EVENTS"."event" event
    "TUTORIAL_CUSTOMER_EVENTS"."entity_id" entity_id
    "TUTORIAL_CUSTOMER_EVENTS"."datestamp" datestamp
    "TUTORIAL_CUSTOMER_PROFILE"."age" age
    "TUTORIAL_CUSTOMER_PROFILE"."region" region
    "TUTORIAL_CUSTOMER_PROFILE"."voice_calls_avg" voice_calls_avg
    "TUTORIAL_CUSTOMER_PROFILE"."data_usage_avg" data_usage_avg
    "TUTORIAL_CUSTOMER_PROFILE"."sms_usage_avg" sms_usage_avg
    Your map should look similar to the following:
    vcxTutorial_datasource_TUT_EXTENDED_EVENTS
  12. Select Save.
  13. Select "" > Segmentation > Data soures to see your newly created data source.