| SWAP_CONTRACT | TEXT | The smart contract address of the DEX swap pool or liquidity pool involved in the transaction. Data type: STRING. This field identifies the specific contract facilitating the swap, which is essential for protocol attribution, pool-level analytics, and tracing liquidity movements. For Metapier swaps, all pools may use the same master contract (e.g., ‘A.609e10301860b683.PierPair’), so the ‘pool_id’ is required to differentiate between pools. Example: ‘A.609e10301860b683.PierPair’ for Metapier, or a unique contract address for other DEXs. Important for understanding liquidity routing, protocol usage, and swap path analysis. |
| DEPLOYMENT_TIMESTAMP | TIMESTAMP_NTZ | The block timestamp from the deployment transaction. |
| TOKEN0_CONTRACT | TEXT | The contract for token0 in the swap pair. Positioning is determined by the order this token occurs in the Swap Contract creation transaction. |
| TOKEN1_CONTRACT | TEXT | The contract for token1 in the swap pair. Positioning is determined by the order this token occurs in the Swap Contract creation transaction. |
| POOL_ID | NUMBER | The ID of the swap pool, as designated by the DEX on contract creation. |
| VAULT_ADDRESS | TEXT | The account address that holds tokens on behalf of the swap contract. |
| DIM_SWAP_POOL_LABELS_ID | TEXT | pk_id is a surrogate primary key, uniquely generated for each row in the table. Data type: STRING or INTEGER (implementation-specific). This field ensures every record is uniquely identifiable, even if the source data lacks a natural primary key. Used for efficient joins, deduplication, and as a reference in downstream models. Example: an auto-incremented integer or a UUID string. Essential for maintaining data integrity and supporting dbt tests for uniqueness. |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the record was first created and inserted into this table. Data type: TIMESTAMP_NTZ. Used for ETL auditing, tracking data freshness, and identifying when data was loaded or updated in the analytics pipeline. Example: ‘2023-01-01 12:00:00’. This field is critical for monitoring data latency, troubleshooting ETL issues, and supporting recency tests in dbt. |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when this record was last updated or modified by an internal ETL or dbt process. Data type: TIMESTAMP_NTZ. Used for change tracking, ETL auditing, and identifying the most recent update to a record. Example: ‘2023-01-02 15:30:00’. This field is important for troubleshooting data issues, monitoring pipeline health, and supporting recency or freshness tests in dbt. |