Giter VIP home page Giter VIP logo

dbt_object_mgmt's Introduction

This sample dbt repo is setup to house examples of snowflake object management with _dbt. It contains the following macros, with example data in the ./snowflake folder.

This macro helps with the creation and management of snowflake users. Any new users that are in the users file will be created and existing will be updated. It is non-destructive and will only disable users with the disabled flag.

The variable DRY_RUN will default to True, which will log statements without sending to snowflake for execution.

In order to not version control / store passwords in plain text, you will also need to pass in the variable PASSWORD which can be passed to your end users, and changed upon their first login.

First timers can use the script download_snowflake_users.py to download any existing users and setup ./snowflake/users/users.yml which you may add any new users and their attributes to. Once set up you can run:

dbt run-operation manage_snowflake_users \
  --args "$(cat ./snowflake/users/users.yml)" \
  --vars '{PASSWORD: $3cr3t}' # add {DRY_RUN: False} to execute

This macro helps with management of whitelists and takes a multiple file approach - it will overwrite exising with the ip addresses included in the .yml files. If adding new IPs, it is also best practivce to document the associated services/ users.

dbt run-operation create_whitelist \
  --args "$(cat ./snowflake/whitelist/{file_name}.yml)" \
  # add --vars {DRY_RUN: False} to execute

_dbt resources:

  • Learn more about dbt in the docs
  • Check out Discourse for commonly asked questions and answers
  • Join the chat on Slack for live discussions and support
  • Find dbt events near you
  • Check out the blog for the latest news on dbt's development and best practices

dbt_object_mgmt's People

Contributors

dancorley avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.