Configuration
Create and configure sources
How to create and configure sources within your Latitude project
Available sources and Configuration
These are the supported connections, go to their specific section to know the specific configuration of each one.
File Requirements and Directory Structure
- Source Files: Must be
.yaml
or.yml
. - Location: All source files should be placed in the
queries
directory. This includes being nested within any subdirectories underqueries
. - One Connection Per File: Each
.yaml
file represents a unique connection. Do not mix multiple connections in a single file. - Naming: Use the
.yaml
filename in your queries to reference the source. - Co-location:
.sql
query files and.yaml
source files should all reside within thequeries
directory or its subdirectories.
Directory hierarchy and source discovery
Subdirectories
You may organize your source files in subfolders within the queries
directory.
Example:
Source Resolution
Queries will utilize the closest source file in their directory hierarchy. If a source file isn’t found in the same directory, the query will search each parent directory until a source file is discovered. Example:
In this scenario, total_subscriptions_by_country.sql
will use postgresql.yaml
as its source since it doesn’t have a closer source file in its directory (aggregations
).