def main(req: func.HttpRequest) -> func.HttpResponse: logging.info( 'Python trigger function loaded date into google spreadsheets.') google.main() return func.HttpResponse( "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.", status_code=200)
def main(req: func.HttpRequest) -> func.HttpResponse: logging.info( 'Python trigger function loaded date into google spreadsheets.') google.main() return func.HttpResponse(json.dumps({ 'response': "This HTTP triggered function did load data into a google spreadsheet." }), status_code=200)
client_id = args.client_id auth_uri = args.auth_uri token_uri = args.token_uri auth_provider_x509_cert_url = args.auth_provider_x509_cert_url client_x509_cert_url = args.client_x509_cert_url google_credentials = { "type": g_type , "project_id": project_id , "private_key_id": private_key_id , "private_key": private_key , "client_email": client_email , "client_id": client_id , "auth_uri": auth_uri , "token_uri": token_uri , "auth_provider_x509_cert_url": auth_provider_x509_cert_url , "client_x509_cert_url": client_x509_cert_url } # - get run context run = Run.get_context() # - ensure that the output directory exists print("Ensuring that the output directory exists...") print("cleaning data from Azure SQL DB ...") google.main(google_credentials) # --- Done print("Done.")
def main(name: str) -> str: google.main() return f"Data was successfully loaded into google spreadsheets."
"""Main script for step: Transform Data""" import argparse import gzip import os import numpy as np import requests from google_spreadsheets import load_data_spreadsheet as google print("Transforming data...") # --- initialization print("Initialization...") # - define and parse script arguments parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument("--input-dir", type=str, required=True, help="input directory") args = parser.parse_args() input_dir = args.input_dir # --- Load results to google spreadsheets google.main() # --- Done print("Done.")