Metadb generates several types of tables to support both current state and historical analytics. Understanding these table types is essential for effective querying.
Main tables have two underscores at the end of their name (e.g., patrongroup__) and contain both the current state and the complete history of all previous states from the data source.All Metadb tables include these metadata columns:
Column
Description
__id
Surrogate key that uniquely identifies a row
__start
Date and time when the row was generated
__end
Date and time when the row became no longer current, or 9999-12-31 00:00:00+00 if still current
__current
Boolean indicating whether the row is current
__origin
Optional identifier for grouping related data from one or more data sources
The __id column is defined by Metadb and is present in all generated tables. It differs from any id column that may exist in your source data.
Metadb can apply transformations to data, particularly for extracting JSON fields into columns. Transformed tables simplify queries by flattening nested data structures.