You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ashb (via GitHub)" <gi...@apache.org> on 2023/02/15 09:21:54 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #28721: Use connection URI in SqliteHook

ashb commented on code in PR #28721:
URL: https://github.com/apache/airflow/pull/28721#discussion_r1106860977


##########
docs/apache-airflow-providers-sqlite/connections/sqlite.rst:
##########
@@ -23,14 +23,22 @@ The SQLite connection type provides connection to a SQLite database.
 
 Configuring the Connection
 --------------------------
-Host (required)
-    The host to connect to.
+Host (optional)
+    The host to connect to. This can either be a file on disk or an in-memory database. If not set, an in-memory database is being used.
 
-Schema (optional)
-    Specify the schema name to be used in the database.
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the sqlite connection.
+    See `Recognized Query Parameters <https://www.sqlite.org/uri.html>`_ for all supported parameters.
 
-Login (required)
-    Specify the user name to connect.
+URI format example
+^^^^^^^^^^^^^^^^^^
 
-Password (required)
-    Specify the password to connect.
+If serializing with Airflow URI:
+
+.. code-block:: bash
+
+   export AIRFLOW_CONN_SQLITE_DEFAULT='sqlite://host/?mode=ro'

Review Comment:
   Host doesn't make any sense for a sqlite example 



##########
docs/apache-airflow-providers-sqlite/connections/sqlite.rst:
##########
@@ -23,14 +23,22 @@ The SQLite connection type provides connection to a SQLite database.
 
 Configuring the Connection
 --------------------------
-Host (required)
-    The host to connect to.
+Host (optional)
+    The host to connect to. This can either be a file on disk or an in-memory database. If not set, an in-memory database is being used.
 
-Schema (optional)
-    Specify the schema name to be used in the database.
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the sqlite connection.
+    See `Recognized Query Parameters <https://www.sqlite.org/uri.html>`_ for all supported parameters.
 
-Login (required)
-    Specify the user name to connect.
+URI format example
+^^^^^^^^^^^^^^^^^^
 
-Password (required)
-    Specify the password to connect.
+If serializing with Airflow URI:
+
+.. code-block:: bash
+
+   export AIRFLOW_CONN_SQLITE_DEFAULT='sqlite://host/?mode=ro'
+
+When specifying the connection as an environment variable in Airflow versions prior to 2.3.0, you need to specify the connection using the URI format.

Review Comment:
   What changed with 2.3? (I don't know what I was a user am meant to take from this paragraph)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org