Introduction to the Log_File_Schema_Dataset_Links Table
The log_file_schema_dataset_links table is designed to establish and manage relationships between log file schemas and datasets. This table plays a crucial role in the system by facilitating the mapping of structured data schemas to various datasets, enabling flexible and versioned data integration.Table Structure
The log_file_schema_dataset_links table is structured to maintain the connections between schemas and datasets while providing additional metadata. Here’s a detailed breakdown of its columns:| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | Unique identifier for each link |
| company_id | uuid | foreign key (companies) | Reference to the company owning the link |
| schema_id | uuid | foreign key (log_file_schemas) | Reference to the associated schema |
| dataset_id | uuid | foreign key (datasets) | Reference to the associated dataset |
| path_key | jsonb | not null | JSON representation of the data mapping path |
| created_at | timestamptz | not null, default now() | Timestamp of link creation |
| is_active | boolean | not null, default true | Indicates whether the link is currently active |
| schema_revision | integer | not null, default 1 | Revision number of the associated schema |
Usage and Functionality
The log_file_schema_dataset_links table is designed to be flexible and support versioned schema-to-dataset mappings. Here are some key points about its usage:- Schema-Dataset Association: The table allows for many-to-many relationships between schemas and datasets, enabling reuse of schemas across multiple datasets and vice versa.
-
Versioning Support: The
schema_revisioncolumn facilitates schema versioning, allowing the system to maintain multiple versions of schema-dataset mappings over time. -
Active Link Management: The
is_activecolumn provides a mechanism to enable or disable specific schema-dataset links without deleting them, offering flexibility in managing data integrations. -
Data Mapping: The
path_keycolumn stores a JSON representation of the mapping between schema elements and dataset fields, allowing for complex and nested data structures.
Notes
-
Example usage in TypeScript:
-
The table works in conjunction with the
log_file_schemastable, which stores the actual schema definitions, including sample file data and metadata.

