Davide95 opened a new issue #15108:
URL: https://github.com/apache/airflow/issues/15108


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   
   **Apache Airflow version**: 2.0.1
   
   **What happened**:
   
   From the docs it is reported that "you can choose cursor as {"cursor": 
"dictcursor"}." 
(https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/_api/airflow/providers/postgres/hooks/postgres/index.html).
   
   I was not able to use this feature, it may be a bug.
   
   Exception: `ERROR - tuple indices must be integers or slices, not str`
   
   **What you expected to happen**:
   
   I should be able to use the correct cursor while executing the queries
   
   **How to reproduce it**:
   
   ```
   hook = PostgresHook(
         postgres_conn_id='conn-id',
         extra=json.dump({'cursor': 'dictcursor'})
   )
   
   row = hook.get_first(
           sql="""select * from filestatus """
   )
   
   logging.info(row['parquetfile'])
   ```


-- 
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:
us...@infra.apache.org


Reply via email to