Git Product home page Git Product logo

canvas-data-loader's Introduction

Canvas Data Loader

This is the source code for the Canvas Data Loader. The Canvas Data Loader is an example application that downloads your data, and imports it into a Database. The process is completely automated, and is able to handle things like Historical Refreshes, Schema Changes, and the 24-36 hour variance all without issue.

It should be noted although there are better options out there, there isn't a reason why you couldn't use the loader to handle all of your imports everyday. The Canvas Data Loader could for example handle your imports at first, and then later off be handed to a more stable process.

Support

Although this is under the Instructure Repo this is purely an example application, and as such is not fully supported by Instructure.

However, the Canvas Data Support team is happy to field requests about usage in the standard [email protected] email.

How Do I Use It?

The following instructions are for a linux server, but steps 1-5 should work universally. You'll just need to use your systems way of scheduling a repeating task instead of crons if you are not using linux.

  • Clone this repository.
  • Copy the default configuration, and modify it to your needs:
    • cp ./config/default.toml ./config/local.toml
    • my_text_editor ./config/local.toml
  • Choose a home for the importer, and copy this repository there.
  • Install Rust
  • Build a release version: cargo build --release.
  • Setup a crontab to run the importer every hour:
    • crontab -e
    • Enter on it's own line, replacing the path to your importer: 0 * * * * cd <my_cdl_location> && RUST_LOG=info ./target/release/cdl-runner > /var/log/cdl-log 2>&1
  • Tadah!

Configuration Using Environment Variables

Configuration can also be done using environment variables instead of, or in addition to the ./config/local.toml file. For example, you may wish to use environment variables for the API key/secret and use the file for the remaining configuration.

Example:

export cdl__canvasdataauth__api_key=abcdefg123456 export cdl__canvasdataauth__api_secret=123456abcdefg

Possible environment variables:

  • cdl__canvasdataauth__api_key
  • cdl__canvasdataauth__api_secret
  • cdl__database__db_type
  • cdl__database__url
  • cdl__only_load_final
  • cdl__rocksdb_location
  • cdl__save_location
  • cdl__skip_historical_imports

License

The Canvas Data Loader is Licensed under MIT.

canvas-data-loader's People

Contributors

stuartf avatar jlongland avatar securityinsanity avatar

Stargazers

Yovany Alvarez Correa 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.