PART B: Query ML Matched data using Athena.
1. Navigate to the AWS Athena Console
2. Once in Athena console, Choose Data Source as AwsDataCatalog and Database as C360_workshop_db
3. On the AWS Athena menu, copy and paste below SQL command in Query Editor to create customer_master_vw.
CREATE view customer_master_vw AS SELECT match_id AS uci_id,
dup_cnt, id, split_part(id,'-', 1) AS src_id,
split_part(id, '-', 2) AS src,
first_name, last_name, company,
ssn, date_of_birth, home_phone FROM (SELECT *,count(*) OVER (partition by match_id) AS dup_cnt FROM "c360_workshop_db"."ml_matched_auto_property")
4. Verify that the view was created successfully.
5. Run below query to check sample duplicate records
SELECT *
FROM customer_master_vw
WHERE first_name like 'Jam%' and last_name like 'Sanchez%';
This completes Lab 3B. Please continue to Lab 4.