Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Script transform with python fails when no data is present in the stream #3174

Open
harrisward opened this issue Aug 28, 2023 · 3 comments

Comments

@harrisward
Copy link

harrisward commented Aug 28, 2023

Apache Hop version?

2.6.0-SNAPSHOT (2023-08-17 07.29.06)

Java version?

openjdk version "11.0.16.1" 2022-08-12 LTS

Operating system

Windows

What happened?

When you create a python step and NO data can be detected in the stream to the python step the step will throw an error that it cannot find the input fields which is not the case as the field exists on the input stream it just that there is no data coming into the step

python-bug.mp4

Issue Priority

Priority: 2

Issue Component

Component: Transforms

@github-actions github-actions bot added P1 Critical Issue Transforms labels Aug 28, 2023
@mattcasters mattcasters changed the title [Bug]: Python Step fails to read fields when no data is present in the stream [Bug]: Script transform with python fails when no data is present in the stream Nov 15, 2023
@mattcasters
Copy link
Contributor

mattcasters commented Nov 15, 2023

Well, I'm not sure we can actually fix this. We want to have the Script transform being capable of generating rows, as shown in the integration tests for this transform. On the flip side of that, we can't just invent values or not run the script when there is no input. So that leaves us with proper handling of the scenario, checking for undefined or indeed proper exception handling.

@mattcasters mattcasters removed the P1 Critical Issue label Nov 15, 2023
@mattcasters
Copy link
Contributor

Perhaps we can create a new option in the Script transform to not process rows when there is no input to cover this scenario.

@Akira74
Copy link

Akira74 commented Dec 19, 2024

When you create a python step in a pipeline (pipeline_sub), that will receive data from "Get rows from result" and use execute the pipeline with the Pipeline executor from e.g. pipeline_main it will always fail, even if it will receive data. All of the Python Script transformations are failing in the sub pipeline, even if they receive data within the pipeline later. I always get the error, that the Field is not there.

Akira74 added a commit to Akira74/hop_python_bug that referenced this issue Dec 19, 2024
Changes made, to due to bug apache#3174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants