Coder Social home page Coder Social logo

rhetprieto / dsctl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snowplow-incubator/dsctl

0.0 0.0 0.0 40 KB

Data Structures Control, or dsctl, is a client to the Snowplow BDP Data Structures API.

License: Apache License 2.0

Python 100.00%

dsctl's Introduction

Data Structures Control

Data Structures Control, or dsctl for short, is a client to the Snowplow BDP Data Structures API. This API can be used by Snowplow Analytics customers as elaborated in the respective documentation. To invoke the API, one needs to authenticate with a JSON web token.

The dsctl script has been built with CI/CD pipelines in mind, for example a git-flow like workflow where schemas merged into develop end up to a development/QA pipeline while schemas merged into the main branch are deployed in production.

The first iteration of the script includes the following functionality:

  1. Authenticating with the API
  2. Validating a data structure
  3. Promoting a validated data structure to dev
  4. Promoting a data structure from dev to prod.

The samples directory contains two sample inputs and a script that uses them. In general, input to the script can come from stdin or read from a file using the --file parameter. All the available parameters are as follows:

  -h, --help            show this help message and exit
  --token-only          only get an access token and print it on stdout
  --token TOKEN         use this token to authenticate
  --file FILE           read schema from file (absolute path) instead of stdin
  --type {event,entity}
                        document type
  --includes-meta       the input document already contains the meta field
  --promote-to-dev      promote from validated to dev; reads parameters from stdin or schema file
  --promote-to-prod     promote from dev to prod; reads parameters from stdin or schema file
  --message MESSAGE     message to add to version deployment

By default, when given no arguments, the script will validate its input.

Environment variables

The following non-optional environment variables must be set:

  • CONSOLE_ORGANIZATION_ID -- the organization ID as it can be found in BDP Console
  • CONSOLE_API_KEY -- the API key generated via the BDP Console UI

dsctl's People

Contributors

cksnp 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.