You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "ahmedabu98 (via GitHub)" <gi...@apache.org> on 2024/06/04 15:17:51 UTC
[PR] [Python] Managed Transforms API [beam]
ahmedabu98 opened a new pull request, #31495:
URL: https://github.com/apache/beam/pull/31495
Adding Python API for Managed transforms, similar to the [Java API](https://github.com/ahmedabu98/beam/blob/bb4ad994304d0bb5f31196f3bc2e4e3616ae59bb/sdks/java/managed/src/main/java/org/apache/beam/sdk/managed/Managed.java#L76).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2406770462
@chamikaramj the last comment was just addressed. It's been a while though, lmk if you'd like to take another quick look before I merge
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2414374278
```
> Task :rat
Files with unapproved licenses:
- /runner/_work/beam/beam/sdks/python/apache_beam/transforms/managed_iceberg_it_test.py
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2176728209
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment `assign set of reviewers`
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1796571662
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
+ KAFKA: "beam:schematransform:org.apache.beam:kafka_read:v1",
+ }
+
+ def __init__(
+ self,
+ source: str,
+ config: Optional[Dict[str, Any]] = None,
+ config_url: Optional[str] = None,
+ expansion_service=None):
+ super().__init__()
+ self._source = source
+ identifier = self.READ_TRANSFORMS.get(source.lower())
+ if not identifier:
+ raise ValueError(
+ f"An unsupported source was specified: '{source}'. Please specify "
+ f"one of the following sources: {self.READ_TRANSFORMS.keys()}")
+
+ self._expansion_service = _resolve_expansion_service(
+ source, identifier, expansion_service)
+ self._underlying_identifier = identifier
+ self._yaml_config = yaml.dump(config)
+ self._config_url = config_url
+
+ def expand(self, input):
+ return input | SchemaAwareExternalTransform(
+ identifier=_MANAGED_IDENTIFIER,
+ expansion_service=self._expansion_service,
+ rearrange_based_on_discovery=True,
+ transform_identifier=self._underlying_identifier,
+ config=self._yaml_config,
+ config_url=self._config_url)
+
+ def default_label(self) -> str:
+ return "Managed Read(%s)" % self._source.upper()
+
+
+class Write(PTransform):
+ """Write using Managed Transforms"""
+ WRITE_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_write:v1",
+ KAFKA: "beam:schematransform:org.apache.beam:kafka_write:v1",
+ }
+
+ def __init__(
+ self,
+ sink: str,
+ config: Optional[Dict[str, Any]] = None,
+ config_url: Optional[str] = None,
+ expansion_service=None):
+ super().__init__()
+ self._sink = sink
+ identifier = self.WRITE_TRANSFORMS.get(sink.lower())
+ if not identifier:
+ raise ValueError(
+ f"An unsupported sink was specified: '{sink}'. Please specify "
+ f"one of the following sinks: {self.WRITE_TRANSFORMS.keys()}")
+
+ self._expansion_service = _resolve_expansion_service(
+ sink, identifier, expansion_service)
+ self._underlying_identifier = identifier
+ self._yaml_config = yaml.dump(config)
+ self._config_url = config_url
+
+ def expand(self, input):
Review Comment:
Added an integration test for writing and reading from Iceberg
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "chamikaramj (via GitHub)" <gi...@apache.org>.
chamikaramj commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2269483121
LGTM. We can merge after existing comments are addressed.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2414450950
Ahh my apologies, I didn't pay attention and thought the failure was a flake
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681570192
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
Review Comment:
Good idea, will do
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681609709
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
+ KAFKA: "beam:schematransform:org.apache.beam:kafka_read:v1",
+ }
+
+ def __init__(
+ self,
+ source: str,
+ config: Optional[Dict[str, Any]] = None,
+ config_url: Optional[str] = None,
+ expansion_service=None):
+ super().__init__()
+ self._source = source
+ identifier = self.READ_TRANSFORMS.get(source.lower())
+ if not identifier:
+ raise ValueError(
+ f"An unsupported source was specified: '{source}'. Please specify "
+ f"one of the following sources: {self.READ_TRANSFORMS.keys()}")
+
+ self._expansion_service = _resolve_expansion_service(
+ source, identifier, expansion_service)
+ self._underlying_identifier = identifier
+ self._yaml_config = yaml.dump(config)
+ self._config_url = config_url
+
+ def expand(self, input):
+ return input | SchemaAwareExternalTransform(
+ identifier=_MANAGED_IDENTIFIER,
+ expansion_service=self._expansion_service,
+ rearrange_based_on_discovery=True,
+ transform_identifier=self._underlying_identifier,
+ config=self._yaml_config,
Review Comment:
Java's ManagedSchemaTransform already does this validation. We can also validate here when we add native managed transforms
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681604351
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
Review Comment:
'PCollection(s)' ?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681604770
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
Review Comment:
SG
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "chamikaramj (via GitHub)" <gi...@apache.org>.
chamikaramj commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681545886
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
+ KAFKA: "beam:schematransform:org.apache.beam:kafka_read:v1",
+ }
+
+ def __init__(
+ self,
+ source: str,
+ config: Optional[Dict[str, Any]] = None,
+ config_url: Optional[str] = None,
+ expansion_service=None):
+ super().__init__()
+ self._source = source
+ identifier = self.READ_TRANSFORMS.get(source.lower())
+ if not identifier:
+ raise ValueError(
+ f"An unsupported source was specified: '{source}'. Please specify "
+ f"one of the following sources: {self.READ_TRANSFORMS.keys()}")
+
+ self._expansion_service = _resolve_expansion_service(
+ source, identifier, expansion_service)
+ self._underlying_identifier = identifier
+ self._yaml_config = yaml.dump(config)
+ self._config_url = config_url
+
+ def expand(self, input):
+ return input | SchemaAwareExternalTransform(
+ identifier=_MANAGED_IDENTIFIER,
+ expansion_service=self._expansion_service,
+ rearrange_based_on_discovery=True,
+ transform_identifier=self._underlying_identifier,
+ config=self._yaml_config,
Review Comment:
Only one of config or config_url should be set, right ? Should we also validate here ?
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
Review Comment:
`_EXPANSION_SERVICE_JAR_TARGETS` ?
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
Review Comment:
(1) It can be any transform.
(2) API wise, I think it's cleaner to separate these. Basically what the user is saying is, "I want to use the Managed Iceberg transform and use this config to configure it". The config can be available locally or remotely. Also, this make it easy to identify the primary function of a transform looking at a pipeline definition.
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
Review Comment:
Also, let's make sure that this is consistent with (and has the same details as) what we mention for Java: https://github.com/apache/beam/blob/2d6d55b98cef5eacc4abd93863de2132cf89bea2/sdks/java/managed/src/main/java/org/apache/beam/sdk/managed/Managed.java#L4
Specifically what it means by "managed by the runner" is up to the runner. Some runners may do absolutely nothing while other runners may upgrade transforms to more recent/better versions.
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
Review Comment:
\`PCollection\` (also for other class names used here)
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
Review Comment:
+1 (also for Java).
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
+ KAFKA: "beam:schematransform:org.apache.beam:kafka_read:v1",
+ }
+
+ def __init__(
+ self,
+ source: str,
+ config: Optional[Dict[str, Any]] = None,
+ config_url: Optional[str] = None,
+ expansion_service=None):
+ super().__init__()
+ self._source = source
+ identifier = self.READ_TRANSFORMS.get(source.lower())
+ if not identifier:
+ raise ValueError(
+ f"An unsupported source was specified: '{source}'. Please specify "
+ f"one of the following sources: {self.READ_TRANSFORMS.keys()}")
+
+ self._expansion_service = _resolve_expansion_service(
+ source, identifier, expansion_service)
+ self._underlying_identifier = identifier
+ self._yaml_config = yaml.dump(config)
+ self._config_url = config_url
+
+ def expand(self, input):
+ return input | SchemaAwareExternalTransform(
+ identifier=_MANAGED_IDENTIFIER,
+ expansion_service=self._expansion_service,
+ rearrange_based_on_discovery=True,
+ transform_identifier=self._underlying_identifier,
+ config=self._yaml_config,
+ config_url=self._config_url)
+
+ def default_label(self) -> str:
+ return "Managed Read(%s)" % self._source.upper()
+
+
+class Write(PTransform):
+ """Write using Managed Transforms"""
+ WRITE_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_write:v1",
+ KAFKA: "beam:schematransform:org.apache.beam:kafka_write:v1",
+ }
+
+ def __init__(
+ self,
+ sink: str,
+ config: Optional[Dict[str, Any]] = None,
+ config_url: Optional[str] = None,
+ expansion_service=None):
+ super().__init__()
+ self._sink = sink
+ identifier = self.WRITE_TRANSFORMS.get(sink.lower())
+ if not identifier:
+ raise ValueError(
+ f"An unsupported sink was specified: '{sink}'. Please specify "
+ f"one of the following sinks: {self.WRITE_TRANSFORMS.keys()}")
+
+ self._expansion_service = _resolve_expansion_service(
+ sink, identifier, expansion_service)
+ self._underlying_identifier = identifier
+ self._yaml_config = yaml.dump(config)
+ self._config_url = config_url
+
+ def expand(self, input):
Review Comment:
Can we add some unit-test coverage using simple pipelines ?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 merged PR #31495:
URL: https://github.com/apache/beam/pull/31495
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2413019734
Fixes #31830
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1679997222
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
Review Comment:
what does 'managed by the runner' practically mean for a user? or where to find more information about it?
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
Review Comment:
I am curious about the boundaries for the 'managed' scope.
1) Is it always a source/sink, or potentially any transform?
2) is the transform being managed is named 'Read'? if so, why I wonder if beam.managed.ICEBERG should be part of a config instead of a separate argument here.
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
Review Comment:
I think we should define the URNs in protos and reference through common_urns.py or python_urns.py instead since this is shared across SDKs?
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
Review Comment:
should we s/READ_TRANSFORMS/_READ_TRANSFORMS? or is it intentionally public so that it can be dynamically modified?
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
Review Comment:
Consider:
- "Read and Write for Apache Kafka"
- "Read and Write for Apache Iceberg"
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
Review Comment:
would it make sense to provide a real kafka config here?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2414369456
Looks like we merged this with
beam_PreCommit_RAT (Run RAT PreCommit) failing, and it is still broken at master @ahmedabu98 - could you PTAL? Thanks!
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681594840
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
Review Comment:
Thanks, this should be private
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681603926
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
Review Comment:
Technically it can be more then one PCollection?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681594545
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
Review Comment:
Done
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2229429412
Successful Dataflow run ([2024-07-15_13_54_11-2004515317250011573](https://pantheon.corp.google.com/dataflow/jobs/us-central1/2024-07-15_13_54_11-2004515317250011573)) with the following code:
```python
import logging
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
_LOGGER = logging.getLogger(__name__)
_LOGGER.setLevel(logging.INFO)
options = PipelineOptions([
"--runner=DataflowRunner",
"--job_name=managed-iceberg-read-demo",
"--project=apache-beam-testing",
"--temp_location=gs://apache-beam-testing-ahmedabualsaud/tmp",
"--region=us-central1",
"--sdk_location=sdks/python/dist/apache_beam-2.59.0.dev0.tar.gz",
"--sdk_harness_container_image_overrides=.*java.*,gcr.io/apache-beam-testing/beam-sdk/beam_java8_sdk:latest"
])
with beam.Pipeline(options=options) as p:
p | beam.managed.Read(
"iceberg",
config={
"table": "my_database.my_table",
"catalog_name": "ahmed_catalog",
"catalog_properties": {
"catalog-impl": "org.apache.iceberg.hadoop.HadoopCatalog",
"warehouse": "gs://ahmedabualsaud-apache-beam-testing"
}}) | "Log rows" >> beam.Map(_LOGGER.info)
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1706112925
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
+the underlying runner.
+
+Using Managed Transforms
+========================
+Managed transforms have a defined configuration and can be built using an
+inline :class:`dict` like so::
+
+ results = p | beam.managed.Read(
+ beam.managed.ICEBERG,
+ config={"param_1": "foo",
+ "param_2": "bar"})
+
+A YAML configuration file can also be used to build a Managed transform. Say we
+have the following `config.yaml` file::
+
+ param_1: "foo"
+ param_2: "bar"
+
+Simply provide the location to the file like so::
+
+ input_rows = p | beam.Create(...)
+ input_rows | beam.managed.Write(
+ beam.managed.KAFKA,
+ config_url="path/to/config.yaml")
+
+Available transforms
+====================
+Available transforms are:
+
+- **Kafka**
+- **Iceberg**
+
+**Note:** inputs and outputs need to be PCollections of Beam
+:py:class:`apache_beam.pvalue.Row` elements.
+
+**Note:** This Managed API uses Java's ManagedSchemaTransform under the hood.
+"""
+
+from typing import Any
+from typing import Dict
+from typing import Optional
+
+import yaml
+
+from apache_beam.transforms.external import BeamJarExpansionService
+from apache_beam.transforms.external import SchemaAwareExternalTransform
+from apache_beam.transforms.ptransform import PTransform
+
+ICEBERG = "iceberg"
+KAFKA = "kafka"
+_MANAGED_IDENTIFIER = "beam:transform:managed:v1"
+_GRADLE_TARGETS = {
+ "sdks:java:io:expansion-service:shadowJar": [KAFKA, ICEBERG],
+}
+
+__all__ = ["ICEBERG", "KAFKA", "Read", "Write"]
+
+
+class Read(PTransform):
+ """Read using Managed Transforms"""
+ READ_TRANSFORMS = {
+ ICEBERG: "beam:schematransform:org.apache.beam:iceberg_read:v1",
Review Comment:
Done
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "chamikaramj (via GitHub)" <gi...@apache.org>.
chamikaramj commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1800203364
##########
sdks/python/apache_beam/transforms/managed_it_test.py:
##########
@@ -0,0 +1,70 @@
+import os
+import secrets
+import shutil
+import tempfile
+import time
+import unittest
Review Comment:
Probably this file should be named "managed_iceberg_it_test.py"
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "chamikaramj (via GitHub)" <gi...@apache.org>.
chamikaramj commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1681554958
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
Review Comment:
May be it's also worth mentioning that some of the managed transforms might be natively implemented in Python while others might be x-lang (initially everything under here will be x-lang).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2414452199
Opened #32785
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #31495:
URL: https://github.com/apache/beam/pull/31495#discussion_r1683199448
##########
sdks/python/apache_beam/transforms/managed.py:
##########
@@ -0,0 +1,173 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Managed Transforms.
+
+This module builds and instantiates turnkey transforms that can be managed by
Review Comment:
Added some clarifications
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2163719356
Successful Dataflow run ([2024-06-12_11_40_12-3984761114382040860](https://pantheon.corp.google.com/dataflow/jobs/us-central1/2024-06-12_11_40_12-3984761114382040860)) with the following code:
```python
import logging
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
_LOGGER = logging.getLogger(__name__)
_LOGGER.setLevel(logging.INFO)
options = PipelineOptions([
"--runner=DataflowRunner",
"--job_name=managed-iceberg-read-demo4",
"--project=apache-beam-testing",
"--temp_location=gs://apache-beam-testing-ahmedabualsaud/tmp",
"--region=us-central1",
"--sdk_location=sdks/python/dist/apache_beam-2.57.0.dev0.tar.gz",
"--sdk_harness_container_image_overrides=.*java.*,gcr.io/apache-beam-testing/beam-sdk/beam_java11_sdk:latest"
])
with beam.Pipeline(options=options) as p:
p | "Managed Read from ICEBERG" >> beam.managed.Read(
"iceberg",
config={
"table": "testRead.table16bc5d47",
"catalog_config": {
"catalog_name": "name",
"catalog_type": "hadoop",
"warehouse_location": "gs://temp-storage-for-end-to-end-tests/IcebergIOIT/testRead/08a68b5b-c973-450e-b6dc-fc552a623b35"
}}) | "Log rows" >> beam.Map(_LOGGER.info)
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Python] Managed Transforms API [beam]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #31495:
URL: https://github.com/apache/beam/pull/31495#issuecomment-2174393790
## [Codecov](https://app.codecov.io/gh/apache/beam/pull/31495?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 71.14%. Comparing base [(`bb4ad99`)](https://app.codecov.io/gh/apache/beam/commit/bb4ad994304d0bb5f31196f3bc2e4e3616ae59bb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`a3067dc`)](https://app.codecov.io/gh/apache/beam/commit/a3067dc02c1294331ed27ec25eab87435434e235?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 99 commits behind head on master.
> :exclamation: **Current head a3067dc differs from pull request most recent head 9aaa02d**
>
> Please [upload](https://docs.codecov.com/docs/codecov-uploader) reports for the commit 9aaa02d to get more accurate results.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #31495 +/- ##
=========================================
Coverage 71.14% 71.14%
Complexity 3008 3008
=========================================
Files 1055 1055
Lines 133439 133439
Branches 3248 3248
=========================================
Hits 94929 94929
Misses 35382 35382
Partials 3128 3128
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/beam/pull/31495?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org