You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/17 11:35:37 UTC

[GitHub] [airflow] kaxil commented on issue #11920: Add how-to Guide for Sqlite operators

kaxil commented on issue #11920:
URL: https://github.com/apache/airflow/issues/11920#issuecomment-728869648


   > Hey @kaxil
   > 
   > I have created/edited the following files:
   > 
   > _airflow/providers/sqlite/example_dags/**init**.py airflow/providers/sqlite/example_dags/example_sqlite.py docs/howto/operator/index.rst docs/howto/operator/sqlite.rst_
   > 
   > However, I have two problems:
   > 
   > 1. When I try to git push my changes, I am returned the following message:
   >    ERROR: Permission to apache/airflow.git denied to WilliamTun.
   >    fatal: Could not read from remote repository.
   >    Could you please tell me where I can get the relevant ssh key to push to this repo?
   > 2. In the sqlite.rst file, I was unsure what the input parameters were. Could you tell me where I can get the info? I assumed it was in airflow/providers/sqlite/hooks/sqlite.py
   >    However, by looking at the code:
   > 
   > `class SqliteHook(DbApiHook):
   > """Interact with SQLite."""
   > 
   > ```
   > conn_name_attr = 'sqlite_conn_id'
   > default_conn_name = 'sqlite_default'
   > 
   > def get_conn(self) -> sqlite3.dbapi2.Connection:
   >     """Returns a sqlite connection object"""
   >     conn_id = getattr(self, self.conn_name_attr)
   >     airflow_conn = self.get_connection(conn_id)
   >     conn = sqlite3.connect(airflow_conn.host)
   >     return conn`
   > ```
   > 
   > I could only assume the parameters needed to connect to sqlite was:
   > 
   > * * Parameter
   >   * Input
   > * * conn_id: string
   >   * connection ID
   > 
   > Please do correct me if I am wrong. Thank you.
   
   1) You won't have write access to https://github.com/apache/airflow, so you will have to create a fork - https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#step-1-fork-the-apache-airflow-repo
   
   2) Same as MySQL: https://airflow.readthedocs.io/en/latest/howto/operator/mysql.html
   
   ![image](https://user-images.githubusercontent.com/8811558/99385474-f68df200-28c8-11eb-96ca-72ff62ee93dc.png)
   


----------------------------------------------------------------
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.

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