Mastering Development

Python: SqlAlchemy map existing view to ORM Object

I currently try to map an existing view within my postgreSQL DB to an SqlAlchemy ORM object in python. My view has the following name path_number_view and joins some tables together. It is wokring fine. But I am not able to map the view to an ORM object, when starting the application I get an […]

Database Development SQL

Cannot create database with SQLAlchemy with SQL Server

Please note that I have been attempting to create a new database using SQLAlchemy, but have gotten many errors where I am attempting to work with laravel and vagrant. Thankfully I have been able to create a new database using pyodbc, but ultimately I would like to do everything through SQLAlchemy. This is the code […]

Development MySQL

Airflow Timeout Exceptions – Broken DAG

I’m currently using Airflow 1.10.6 with CeleryExecutor and Google CloudSQL (mysql) as database backend using cloudsql proxy. I’m trying to dynamically generate DAGs based on a database query. db_hook = mysql_hook.MySqlHook(mysql_conn_id=”metadata_db”) items = db_hook.get_records(“SELECT items from item_table”) for item in items: curr_item = str(item[0]) DAG_ID = ‘item-{}-dag’.format(curr_item) dag = models.DAG( DAG_ID, schedule_interval=’@daily’, catchup=False, max_active_runs=1, default_args=default_dag_args) […]