john-jac edited a comment on pull request #19137:
URL: https://github.com/apache/airflow/pull/19137#issuecomment-949665818


   > Why can't we use RedshiftSQLHook or RedshiftHook? Why do we need a new 
hook? It's not clear to me.
   
   RedshiftSQLHook extends DbApiHook, whereas RedshiftDataHook is based on 
AwsBaseHook.  While they have similar capabilities, the underlying methods are 
completely different.  If we changed RedshiftSQLHook it would break anything 
based on at Postgres connection.
   
   > I suggest we add these methods to the existing RedshiftHook and create 
operator(s) that would do what we want
   
   RedshiftHook is based on the boto3 
[redshift](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/redshift.html)
 client, which is a set of functions for managing the Redshfit cluster and does 
not provide any data access.  
   
   RedshiftDataHook is based on the boto3 
[redshift-data](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/redshift-data.html)
 client, which is a set of functions for accessing Redshift data.  I don't 
believe we have any other examples where an AWS hook wraps two different boto3 
clients.  Also, it has different IAM policy definitions, so someone with access 
to data may not have access to cluster management, and vice-versa.
   
   


-- 
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-unsubscr...@airflow.apache.org

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


Reply via email to