Example #1
0
def overwrite(variable):
    driver = Driver()
    driver.connect(mode='heroku')
    input_json = request.get_json(force=True)
    input_json['table'] = variable
    restart_query = render_template('restart.sql.jinja2', **input_json)
    insert_query = render_template('jsondump.sql.jinja2', **input_json)
    driver.push(restart_query)
    driver.push(insert_query)
Example #2
0
def push():
    driver = Driver()
    driver.connect(mode='heroku')
    input_json = request.get_json(force=True)
    query = render_template('jsondump.sql.jinja2', **input_json)
    driver.push(query)