This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3bc0da3  Add documentation on specifying a DB schema. (#22347)
3bc0da3 is described below

commit 3bc0da326e7963eab9154913d5cafbc1be1c1a67
Author: nick <[email protected]>
AuthorDate: Sun Mar 20 00:28:19 2022 -0700

    Add documentation on specifying a DB schema. (#22347)
    
    * Add documentation on specifying a DB schema.
    
    From request - 
https://github.com/apache/airflow/issues/17374#issuecomment-1060019956
    
    Co-authored-by: Nick Shook <[email protected]>
---
 docs/apache-airflow/howto/set-up-database.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/apache-airflow/howto/set-up-database.rst 
b/docs/apache-airflow/howto/set-up-database.rst
index 6c480bf..e848b74 100644
--- a/docs/apache-airflow/howto/set-up-database.rst
+++ b/docs/apache-airflow/howto/set-up-database.rst
@@ -339,6 +339,16 @@ Other configuration options
 
 There are more configuration options for configuring SQLAlchemy behavior. For 
details, see :ref:`reference documentation <config:core>` for ``sqlalchemy_*`` 
option in ``[core]`` section.
 
+For instance, you can specify a database schema where Airflow will create its 
required tables. If you want Airflow to install its tables in the ``airflow`` 
schema of a PostgreSQL database, specify these environment variables:
+
+.. code-block:: bash
+
+    export 
AIRFLOW__CORE__SQL_ALCHEMY_CONN="postgresql://postgres@localhost:5432/my_database?options=-csearch_path%3Dairflow"
+    export AIRFLOW__CORE__SQL_ALCHEMY_SCHEMA="airflow"
+
+Note the ``search_path`` at the end of the ``SQL_ALCHEMY_CONN`` database URL.
+
+
 Initialize the database
 -----------------------
 

Reply via email to