Project
syncmaven init
Syncmaven Project is represented by a folder that contains all the necessary files to define how your data should be synced. The project folder contains the following sub-folders:
Folder | Description |
---|---|
models | Defines Model. Each model contains an SQL query and metadata |
connections | Defines Connections. Each connection tells Syncmaven on how to connect to a certain service. Connections are used in syncs, see below |
syncs | Defines Syncs. Each syncs define how data should be synced from a source to a destination |
Each model, sync or connection is defined in a separate .yml
or .yaml
file (models can be defined with .sql
files as well). Every file can reference environment variables using the ${env.VAR_NAME}
syntax.
The project can contain .env
and .env.local
files. If any of these files exist, Syncmaven will load the environment variables from them (.env.local
will override .env
).
Environment Variables
Environment variables can be used in the project files. In fact, they must be used for sensitive information like passwords or API keys. In addition to variables passed to a process, Syncmaven will from
.env
file in the project root.env.local
file in the project root.env
file in the current working directory.env.local
file in the current working directory- Variables from file specified by
--env-file
command line argument. It’s possible to specify multiple files by using the--env-file
argument multiple times.
Variables from those files will be merged with last file having the highest priority.