I was going through the Airflow documentation and as per the documentation
As Airflow was built to interact with its metadata using the great SqlAlchemy library, you should be able to use any database backend supported as a SqlAlchemy backend.
Although Cassandra doesn't support SqlAlchemy, I see the project Flask-CQLAlchemy provides and SQLAlchemy like API.
Flask-CQLAlchemy handles connections to Cassandra clusters and provides a Flask-SQLAlchemy like interface to declare models and their columns in a Flask app Links
I am just getting started with Airflow and trying to setup its backend Db, will Cassandra with Flas-CQLAlchemy works for Airlow metadata repo?
Related
I am testing WSO2 API Manager locally and using the in-built database. I want to change the database form the internal database to MSSQL. Is there a way I can do this easily? Any tools/ scripts?
Trying to migrate from internal database to MSSQL
WSO2 doesn't provide any tools to do Cross Database data migrations. But there are third-party tools that can do Data migration between H2 and MSSQL, but attempting a direct Data migration may be tricky, you may have to perform the migration and test the deployment thoroughly.
The most straightforward option is to create a new deployment with MSSQL and use API Controller to Migrate the APIs and Applications from the old environment to the new one.
I am having a flask application which uses airflow data.I would like to access the airflow database from my flask application and query the data.I am able to run raw SQL query.But i should have a solution how to use SQL alchemy query technique in it. For example if i need the dag table data. I should be able to run Dag.query.all() to get all dag data.
Airflow uses SQLAlchemy (currently 1.1.x for the Airflow 1.10 trunk) to manage its models, so you can interact with and query them using the standard SQLAlchemy API as documented in the tutorial.
https://docs.sqlalchemy.org/en/rel_1_1/orm/tutorial.html
You can access your database using a standard database connection string from any Python code, such as your Flask app, as described in the above tutorial as well.
There are examples of various the database connection URL formats supported by create_engine() here.
https://docs.sqlalchemy.org/en/rel_1_1/core/engines.html#database-urls
You can find more info such as the fields on a particular model in Airflow's models.py file.
https://github.com/apache/incubator-airflow/blob/master/airflow/models.py
You can find more SQLAlchemy documentation here.
https://docs.sqlalchemy.org/en/rel_1_1/
I'm currently setting up a Django app on the Google App Engine platform, using a standard environment. Is it possible to connect to a PosgreSQL Google Cloud SQL instance?
I can connect to a MySQL instance by following this tutorial (https://cloud.google.com/python/django/appengine). I can't get PostgreSQL to work however - is this because PostgreSQL only works on a flexible environment?
Many thanks
I am working with a legacy web application based off of Turbogears 1.1 (CherryPy 2.3) and I would like to integrate it with a Django 1.4 web application. What I would like to do ideally is find some way for both applications to share authentication/session state so that the experience is seamless to the user.
Both applications can run on the same server and technically can access the same mysql database instance.
Initial thoughts are that this could be achieved by:
Storing session data in a shared database
Use the Django application as a 'master' that would issue requests via http to the turbogears application
Running the Django application from within Cherrpy via the internal CherryPyWSGIServer
Any other suggestions would be welcome!
I would suggest looking into creating a custom Django auth and session backend which reuses the existing Turbogears data. You will likely also find it necessary to use Django 1.5's configurable user model.
So is there any other way to use mysql database with django app on app engine? I found nice solution but it is not free - Google SQL Cloud seem to work great. But how about, moving django app to appengine and connecting to other hosting with mysql db? Or do you have any other solutions?
So to sum up - is there any way to work GAE with outside database?
Actually I have found the answer:
The Python Development Server in the Google App Engine SDK can use a locally-installed MySQL server instance to closely mirror the Google Cloud SQL environment during development.
More info here-> https://developers.google.com/appengine/docs/python/cloud-sql/developers-guide