Skip to content

[Feature][Transform] Add python script tool to Transform #8542

Open
@liugddx

Description

@liugddx

Search before asking

  • I had searched in the feature and found no similar feature requirement.

Description

Clean data by writing python scripts.

transform {
Python {
for key, value in input_dict.items():
if key == "name":
cleaned_value = value.strip() if isinstance(value, str) else value
elif key == "age":
try:
cleaned_value = int(value)
except ValueError:
cleaned_value = None
elif key == "email":
cleaned_value = value.lower() if isinstance(value, str) else value
else:
cleaned_value = value
result.append(cleaned_value)
}
}

Usage Scenario

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions