ambika-garg commented on code in PR #35091:
URL: https://github.com/apache/airflow/pull/35091#discussion_r1390604894


##########
airflow/providers/microsoft/azure/hooks/synapse_pipeline.py:
##########


Review Comment:
   My motivation is to keep code modular and easy to maintain. The `synapse.py` 
file deals with SparkClient and its functions, where as the 
`synapse_pipeline.py` file deals with ArtifactsClient and its functions. So 
both classes have different dependencies. 
   Although I had 2 options:
   1. Include every function of `AzureSynapsePipelineHook` in 
`AzureSynapseHook` class, But that would add on lots of conditional statements, 
difficulty in dependency management and separate naming conventions for 
functions with same functionality but different parameters and return values 
like(`get_conn()`) function, further leading to confusions when code is 
extended.
   2. Make Separate classes for each type of service, where each class has its 
own set of dependencies and responsibility. Also, this approach provides 
consistent naming convention for functions within each class, improving code 
readability. 
   
   I went with 2nd approach. That's why I made a new file. Also, I think making 
new hook class with separate dependencies is easier way to code extension .
   
   Please let me know your opinion on this, since you have diverse background 
on development.
   



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