Writing config files
Configuration files overview (Import)
The Prequel data model is configured via a JSON file with a specific format. By default, the model_name
will be used for the table name in the destination database. (Alternatively you may explicitly set destination_table_name
instead.)
{
"model_name": "logs",
"columns": [
{
"name_in_destination": "id",
"data_type": "string",
"is_primary_key": true
},
{
"name_in_destination": "event_log",
"data_type": "string"
},
{
"name_in_destination": "updated_at",
"data_type": "timestamp",
"is_last_modified": true
}
]
}
Configuration file keys
Each configuration file has 3 top level keys: columns
, and (2 optional) model_name
, and description
.
Config file keys
Config Key | Required | Description |
---|---|---|
model_name | ✅ | Name of table to be loaded into the destination. If left blank, the file name (not including file extension) will be used. |
description | Table description. Will be applied to destination tables if provided. | |
columns | ✅ | A list of all destination columns (for this destination table) to request from sources. This array will be used to request column mappings from data sources.is_primary_key and is_last_modified are two important column flags that indicate which columns to use for detecting changes and propagating changes to the correct row in the destination. One of each must be present on one of the column objects. |
destination_table_name | Table name in destination. If not provided, model_name will be used instead. |
Column object keys
Column object key | Required | Description |
---|---|---|
name_in_destination | ✅ | |
data_type | ✅ | |
is_primary_key | (On exactly one column) | |
is_last_modified | (On exactly one column) | |
description |
Using Acceptable Types
It is important to use the correct
data_type
for each column to ensure compatibility with all destinations. Refer to the Data Types documentation for the complete list of supported types.
Updated 5 months ago