Useful tips when using Python - Cloud

Talend Cloud Pipeline Designer Processors Guide

author
Talend Documentation Team
EnrichVersion
Cloud
EnrichProdName
Talend Cloud
task
Design and Development > Designing Pipelines
EnrichPlatform
Talend Pipeline Designer
Some tips to help the new Talend Pipeline Designer users to use the Python processor.

Selecting hierarchical elements

Syntax Example
input["parent"]["child"]["subchild"]
input["pickup"]["position"]["latitude"]

Preserving the order when parsing Strings in a JSON document

Syntax Example
from collections import OrderedDict
output = json.loads(input['XXX'], object_pairs_hook=OrderedDict)
from collections import OrderedDict
output = json.loads(input['pickup'], object_pairs_hook=OrderedDict)