CREATE SINK adib_rm.cash_holds_sink AS
SELECT
cash_hold_id,
order_id,
provider_hold_id,
funding_account_id,
hold_amount,
float_used,
currency_code,
status,
created_at,
updated_at,
order_execution_state,
order_executed_at,
settlement_id,
settlement_state,
settlement_expected_date,
settlement_settled_at
FROM adib_rm.cash_holds_mv
WITH (
connector='postgres',
host='psql-nonprod-uae-derived.postgres.database.azure.com',
port='6432',
user='migration_user',
password='***',
database='adib-qa-investor-adib-bff',
schema='admin_portal_bff',
table='cash_holds',
type='upsert',
force_compaction='true',
primary_key='cash_hold_id'
)