potiuk commented on a change in pull request #12466:
URL: https://github.com/apache/airflow/pull/12466#discussion_r527275948



##########
File path: airflow/providers/apache/cassandra/provider.yaml
##########
@@ -33,10 +35,15 @@ integrations:
 sensors:
   - integration-name: Apache Cassandra
     python-modules:
-      - airflow.providers.apache.cassandra.sensors.record
-      - airflow.providers.apache.cassandra.sensors.table
+      - .sensors.record
+      - .sensors.table
 
 hooks:
   - integration-name: Apache Cassandra
     python-modules:
-      - airflow.providers.apache.cassandra.hooks.cassandra
+      - .hooks.cassandra
+
+connections:
+  - connection-type: cassandra
+    hook-class: .hooks.cassandra.CassandraHook
+    connection-id-parameter-name: cassandra_conn_id

Review comment:
       There are many other things that are not yet defined here (other PRs are 
addressing it) - extra links and connection in forms in javascript. If you look 
at those, you will understand that those cannot be as easily incorporated in 
the classes. 
   
   I prefer to keep "provider delivered functionality" in one place rather than 
some of it in .yaml, some of this in some connection and some of this in other 
classes.
   
   Also, our proposal is far from complete - it does not actually solve the 
problem of discovering those Hooks (unless you have not posted it. Even with 
the entry_points mechanism, you will have to somehow at least keep the list of 
hooks in each provider (there are at least 4 in the google provider). That 
would mean that you would have to not only keep the list of hooks but also 
remember to update the  "extra" information in the hooks - this will have to be 
(by its nature) split between two places. 
   
   What was your idea here? where did you want to keep the list of connections 
to load?
    




----------------------------------------------------------------
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:
[email protected]


Reply via email to