flow.core Table: dim_contract_labels Type: View
Description
This table contains all contract labels referenced in the events of Flow transactions. Each row represents a unique contract, identified by its event contract address and contract name, and is enriched with account address metadata. The table provides a canonical mapping of contracts to their human-readable names and associated addresses, supporting entity resolution and contract-level analytics across the Flow blockchain.Key Use Cases
- Enriching event and transaction data with contract labels for analytics and dashboards
- Supporting entity resolution and contract-level segmentation in DeFi, NFT, and governance analytics
- Enabling contract-level filtering, grouping, and reporting in business intelligence tools
- Auditing and monitoring contract activity and deployments on Flow
Important Relationships
- Can be joined to
core.fact_eventsviaevent_contractto enrich event data with contract names and addresses - Can be joined to
core.fact_transactionsvia contract addresses for transaction-level analytics - Used by curated gold models in DeFi, NFT, and other domains to provide contract context and labeling
Commonly-used Fields
event_contract: The Flow contract address emitting eventscontract_name: The human-readable name of the contractaccount_address: The account address associated with the contract
Columns
| Column Name | Data Type | Description |
|---|---|---|
| EVENT_CONTRACT_ID | TEXT | |
| EVENT_CONTRACT | TEXT | The Flow contract that emitted the event. Data type: STRING. This value is a concatenation of the contract’s account address and its primary name (e.g., ‘A.0ae53cb6e3f42a79.FlowToken’). Used for identifying the source of events, joining with contract metadata, and analyzing contract activity. Example: ‘A.0ae53cb6e3f42a79.FlowToken’. Equivalent to the ‘Contract’ column on Flowscan. |
| CONTRACT_NAME | TEXT | The primary name assigned to a smart contract on the Flow blockchain, typically derived from the contract’s deployment address. Data type: STRING. Used for identifying, filtering, and joining contract metadata. Example: ‘FlowToken’, ‘TopShot’. Important for contract-level analytics, entity mapping, and dashboarding. |
| ACCOUNT_ADDRESS | TEXT | The account address in 0x form that instantiated the contract called in the event. Note, on the Flow blockchain the account and the contract are separate as the account may have created more than one contract, in rare instances, such as the following FLOW address 0x8624b52f9ddcd04a. |
| 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. |
| DIM_CONTRACT_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. |