Skip to main content

Data Warehouse migrations for dbt.

Project description

migro

Data Warehouse migrations for dbt.

tests codecov lint

Setup

  1. Install migro in a dbt project.

     pip install migro
    
  2. Create a migration. For example:

     mkdir migrations
     migro make create_bobby_tables_user
    
  3. Open the sql file in the migrations folder and add this statement.

     create user bobby_tables password='{{ password }}';
     -- Redshift syntax:
     -- create user bobby_tables with password '{{ password }}';
    
  4. Pretend to run the migration. Notice the password generated by the {{ password }} jinja template.

     migro up --pretend --limit=1
    
  5. Now run the migration.

     migro up
    
  6. Query the new migrations table to see the migration history.

     select * from public.migrations order by id;
    

Data Warehouse Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

migro-0.4.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file migro-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: migro-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for migro-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b5d46724e80dfb4731319dd6b4249112135d75b7fdb078f6c0fd58e8639b710
MD5 e253ccac802566381d0c6aeeba94da62
BLAKE2b-256 2a9c421794c52f333f6af8f383a218d31c44481a2b50a83e8172205441d381ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page