LogoLogo
  • Preen
  • Getting Started
    • Installation
    • Hello World
      • Configuring Sources
      • Creating Models
  • Concepts
    • Overview
    • Sources
    • Models
    • Validation
  • Documentation
    • Config
      • Sources
      • Models
    • Integrations
      • Databases
        • Postgres
        • MySQL
        • MongoDB
      • Cloud Blob Storage
        • Amazon S3
      • File Formats
        • CSV
Powered by GitBook
On this page
  1. Getting Started
  2. Hello World

Configuring Sources

Define the data sources your Preen session can connect to

Preen maintains a configuration file in $HOME/.preen/sources.yml by default. This is can be overridden via the PREEN_CONFIG_PATH environment variable.

A config file might look like this:

sources:
  - name: s3-model
    engine: s3
    connection:
      bucket_name: users
      region: us-east-1
  - name: postgres-model
    engine: postgres
    connection:
      host: localhost
      port: 33061
      database: postgres
      username: root
      password: myp@assword
  - name: mongo-model
    engine: mongodb
    connection:
      host: ${MONGO_HOST}
      port: ${MONGO_PORT}
      database: mongo

In a nutshell, your configuration is primarily a list of data sources, credentials, and their engine classification (see Configfor list of supported engines). Be sure to add this file to your .gitignore if you are keeping it somewhere version controlled.

PreviousHello WorldNextCreating Models

Last updated 6 months ago