Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/providers/apache/beam/hooks/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from typing import Callable, List, Optional

from airflow.exceptions import AirflowException
from airflow.hooks.base_hook import BaseHook
from airflow.hooks.base import BaseHook
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.python_virtualenv import prepare_virtualenv

Expand Down
3 changes: 0 additions & 3 deletions airflow/providers/apache/beam/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,3 @@ hooks:
- integration-name: Apache Beam
python-modules:
- airflow.providers.apache.beam.hooks.beam

hook-class-names:
- airflow.providers.apache.beam.hooks.beam.BeamHook
Comment on lines -44 to -46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not better to add conn_type, conn_name_attr and hook_name to BeamHook instead of deleting these lines?
(e.g in Casssanda:

conn_name_attr = 'cassandra_conn_id'
)

Copy link
Contributor Author

@xinbinhuang xinbinhuang Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a bit tricky for BeamHook to have those attributes because Beam doesn't tie to a specified "backend/runner", it can be run on Dataflow, Flink, Spark, etc. and so their credentials may also come in different forms (i.e. the current operator is using DataFlow).
Overall, I think it's possible to specify those attributes, but it requires some extra thoughts on what the Connection object for Beam will look like. For now, we can at least get rid of those warnings whenever ProvidersManager is instantiated, and this is the intention of this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. It is better just to remove it for now.