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

pass_row parameter should be an input to the field_update step to support functions #1728

Closed
ebAbhay opened this issue Jan 22, 2025 · 0 comments · Fixed by #1729
Closed

pass_row parameter should be an input to the field_update step to support functions #1728

ebAbhay opened this issue Jan 22, 2025 · 0 comments · Fixed by #1729

Comments

@ebAbhay
Copy link
Contributor

ebAbhay commented Jan 22, 2025

Summary

In the field_update step, the pass_row parameter is set to False by default, except for formula which sets it to True before calling the table.convert() from petl. We should allow this parameter to be set to True for functions as well for the same reasons that formula sets it to True.

ebAbhay added a commit to Engine-B/frictionless-py that referenced this issue Jan 22, 2025
…ld_update

# Description
As described in frictionlessdata#1728, pass_row parameter is now added as an editable parameter for the field_update step. This allows us to use row data inside custom python function.

# Tests
Ensured the newly added unit test ` test_step_field_update_with_function_and_pass_row_true` runs without fail and also that all the previous test cases run and pass too.
pierrecamilleri added a commit that referenced this issue Jan 27, 2025
# Description

As described in #1728, pass_row parameter is now added as an editable
parameter for the field_update step. This allows us to use row data
inside custom python function.

The default value of the parameter remains False so that any existing
uses of this functionality will not be affected.

# Tests

Ensured the newly added unit test `test_step_field_update_with_function_and_pass_row_true` runs without
fail and also that all the previous test cases run and pass too.

- fixes #1728

---------

Co-authored-by: Pierre Camilleri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant