Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create
- or replace view entities_seen_on_kafka_only as select
- kafka.entity_id,
- kafka.entity_type,
- kafka.entity_path,
- kafka.seen_at,
- kafka.data
- from
- reconciliation as kafka
- left outer join reconciliation as data_lake on
- kafka.entity_id = data_lake.entity_id
- and data_lake.seen_on = 'Data-Lake'
- where
- kafka.seen_on = 'kafka'
- and exists(
- select
- *
- from
- reconciled_entity_types
- where
- kafka.entity_type = reconciled_entity_types.entity_type
- )
- and data_lake.entity_id is null;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement