Hi,
I have a flow and would like to take in and forward a csv file in said flow. In the flow, the end product should however have the 2nd column values translated. Say we have a python dict for translations:
translations: Dict[str, str] = {
"08.0": "S",
"08.1": "O",
"08.3": "S",
"08.4": "O",
"08.6": "S3",
"09.0": "T",
"10.5": "LS",
"10.6": "LS"
}
What I would like to do would be to check each row’s 2nd column if a key from this dictionary is present in the said 2nd column (substring, doesn’t have to be 100% match), and then change the row so that the 2nd column would be rewritten to the value of the key found from the translation dictionary.
If the row’s 2nd column’s text doesn’t match to any of the dictionary keys, the row should be omitted completely.
I can do this really easily in Python. But how can I achieve this in CData Arc, should I use the ArcScript or create a python-based program that exposes REST API…? The latter sounds a little too much for this simple of a task.
Can I write python snippets inside CData Arc and call those snippets as parts of my flow?