Hi David,

Not an expert in Python and/or the Script transform, but the transform uses
Jython[1] for Python integration.
Their docs have some explanations on how to work with and import modules
and packages [2].

[1] https://www.jython.org/
[2] https://jython.readthedocs.io/en/latest/ModulesPackages/

Regards,
Bart

On Tue, Mar 12, 2024 at 10:58 PM David McNeill <da...@mcpond.co.nz> wrote:

> I'd like to use the flatten_json library in python script in pipeline
> transform script
>
> Hop says:ImportError: No module named flatten in <script> at line number 1
>
> from flatten_json import flatten
> # https://www.geeksforgeeks.org/flattening-json-objects-in-python/
>
> transform.putRow(outputFlat, flatten(valuez))
>
> How do I connect my pipeline to a decent, full featured json parser?
> jackson/jq etc?
>
  • Flatten David McNeill
    • Re: Flatten Bart Maertens

Reply via email to