our pipeline is created from a set of cdc tables, ...
# troubleshooting
i
our pipeline is created from a set of cdc tables, which has duplicates (we can't guarantee exactly once there). We then run a flink sql query to join all of these table and produce a single record. Because we have many joins, duplicates explode the records we're joining/producing (cartesian product results). We tried to reduce this by using deduplication...
Copy code
CREATE TEMPORARY VIEW orders_deduped AS SELECT order_id, user, product, num
FROM (
  SELECT *,
    ROW_NUMBER() OVER (PARTITION BY order_id ORDER BY proctime ASC) AS row_num
  FROM orders)
WHERE row_num = 1
This greatly reduced the issue, but we're still having performance issues. I'm wondering if there are any red flags by creating companion deduped view and then using that as the join tables. I understand that that doesn't prevent processing of duplicates, but I believe if our sink is an upsert-kafka type, it will issue retractions? Are there any issues with above approach and if so, what are some better ways of solving this?