Skip to content

A collection of Bb Data Queries that are developed by and for the Blackboard Community

Notifications You must be signed in to change notification settings

shurrey/BBDN-BlackboardData-Queries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBDN-BlackboardData-Queries

The following format for contributes are as follows:

Example: Get User By User Id

/get-user-by-user-id

  • variables.json
  • query.sql
  • output.json
  • README.md

Example of SQL File with Variables

SQL files can have variables in the query. When retrieving query file, ensure that you check the variables.json file first for any variables to inject into the query:

@app.route('/queries/<query_name>', methods=['GET'])
@login_required
def query_by_name(query_name):
    varibles = requests.get(RAW_VARS_URL.replace('{query_name}', query_name)).json()['variables']
    query = requests.get(RAW_SQL_URL.replace('{query_name}', query_name)).text

    # ensure that if there are vars, then inject them into the query
    for key, value in varibles.items():
        print(key, value)
        query = query.replace('{' + key + '}', str(value))

    return jsonify({
        'query': query
    })

About

A collection of Bb Data Queries that are developed by and for the Blackboard Community

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages