Giter Club home page Giter Club logo

retention-data-pipeline's Introduction

retention-data-pipeline

App for getting data into RAD app

This is a docker image that connects to the EDW and a small Django app that fetches and stores data.

Using the container

  1. Set environemntal variables for the EDW user and password, as well as an SWS authorization bearer token.

    export EDW_USER="netid\\put_netid_here"

    export EDW_PASSWORD="password"

    export RESTCLIENTS_SWS_OAUTH_BEARER="token"

  2. Build and start the container

    docker-compose up -d --build

  3. Connect to the container. Get the container id and connect to the shell on that container

    docker ps This lists all containers, get the id from here

    docker exec -u 0 -it [container ID] /bin/bash

    Example:

    command: docker ps

    output:

         CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                    NAMES
     770330ba50ed        retention-data-pipeline_app   "dumb-init --rewrite…"   6 minutes ago       Up 6 minutes        0.0.0.0:8000->8000/tcp   app
     

    command: docker exec -u 0 -it 770330ba50ed /bin/bash

    output (this is the container shell): root@770330ba50ed:/app#

  4. Either be on the UW network physically or set up the Big IP VPN client to get a campus IP, EDW is restricted to on-campus networking only (this applies to the host running the docker container, eg your workstation)

  5. Activate the virtualenv

    source bin/activate

  6. Run the test commands to verify connections

    ./manage.py edw_connect

    Should take ~30-90 seconds, will only output on error. You can use the dbshell to see the locally stored data

    ./manage.py term_check_test

    Runs a script that queries SWS for term info, checks against a local reference term, then will either initiate an R script that connects to the EDW & writes the parameters it's passed to a txt file once per minute or it will exit and return: 'No term change.'

retention-data-pipeline's People

Contributors

devights avatar peteseibel avatar

Stargazers

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