DD_ORG_OTC_METADATA_VX is a specialized view in the Oracle Data Decision (DD) schema that consolidates metadata for the OverTheCounter (OTC) trading domain. It integrates information from several underlying tables such as DD_ORG_OTC_INSTRUMENTS, DD_ORG_OTC_POSITIONS, and DD_ORG_OTC_PRICING, providing a single point of access for downstream reporting, analytics, and data quality checks.
| Column | Data Type | Description | Source Table/Field |
|---|---|---|---|
| INSTRUMENT_ID | VARCHAR2(30) | Unique identifier for the OTC instrument. | DD_ORG_OTC_INSTRUMENTS.INSTRUMENT_ID |
| INSTRUMENT_TYPE | VARCHAR2(20) | Type of instrument (e.g., IRS, CCS, XCCY). | DD_ORG_OTC_INSTRUMENTS.TYPE |
| NOTIONAL_AMOUNT | NUMBER(18,2) | Notional amount in the reporting currency. | DD_ORG_OTC_POSITIONS.NOTIONAL |
| CURRENCY | VARCHAR2(3) | ISO 4217 currency code. | DD_ORG_OTC_POSITIONS.CCY |
| START_DATE | DATE | Effective start date of the contract. | DD_ORG_OTC_INSTRUMENTS.EFF_START |
| END_DATE | DATE | Maturity or termination date. | DD_ORG_OTC_INSTRUMENTS.EFF_END |
| COUNTERPARTY_ID | VARCHAR2(30) | Identifier of the counterparty. | DD_ORG_OTC_POSITIONS.CPTY_ID |
| PRICING_MODEL | VARCHAR2(25) | Name of the model used for valuation. | DD_ORG_OTC_PRICING.MODEL_NAME |
| MARKET_VALUE | NUMBER(18,2) | Current market value of the instrument. | DD_ORG_OTC_PRICING.MKT_VAL |
| LAST_UPDATE_TS | TIMESTAMP(6) | Timestamp of the latest refresh. | DD_ORG_OTC_INSTRUMENTS.UPDATED_AT |
The definition of DD_ORG_OTC_METADATA_VX follows a classic starschema pattern:
LEFT OUTER JOIN is used from DD_ORG_OTC_INSTRUMENTS to the other two tables on INSTRUMENT_ID. This guarantees that every instrument appears in the view even if pricing or position records are temporarily missing.EXPOSURE_USD = NOTIONAL_AMOUNT * FX_RATE_TO_USD, where the FX rate comes from a reference table DD_REF_FX_RATES.IS_COMPLETE is set to 1 when all mandatory fields are present; otherwise 0.The view is refreshed nightly via a materialized view log. Because it is readonly, no DML statements (INSERT/UPDATE/DELETE) are permitted directly against it.
SELECT COUNT(*) FROM DD_ORG_OTC_METADATA_VX WHERE IS_COMPLETE = 0;
Because the view aggregates multiple large tables, queries can become resourceintensive. The following best practices are recommended:
INSTRUMENT_ID, CURRENCY, or START_DATE to limit row scans. Access to DD_ORG_OTC_METADATA_VX is controlled through Oracles rolebased security:
DD_OTC_READONLY Grants SELECT privileges to analytics teams.DD_OTC_DATA_STEWARD Allows SELECT plus the ability to run refresh procedures.DD_ORG_OTC_METADATA_JSON_VX) for API consumers.Below is a simple query you can run to view the first 20 rows of the view:
SELECT INSTRUMENT_ID, INSTRUMENT_TYPE, NOTIONAL_AMOUNT, CURRENCY, START_DATE, END_DATE, COUNTERPARTY_ID, MARKET_VALUE, IS_COMPLETEFROM DD_ORG_OTC_METADATA_VXWHERE ROWNUM <= 20;
For more detailed examples, consult the internal datadictionary wiki or contact the Data Steward.
