1

I am trying to set a rule that would move up filled lines and hide an empty line (it can be on any line) in a postal address through PythonCaller transformer. I have a database table consisted of address elements (organisation_name, department_name, house_name, house_number, street_name, specific_locality, town, post_code...) and these elements are somehow ordered on address lines.

Here is an example:

house_name
house_number, street_name
town
post_code

What I need to do now is to hide the empty line in the middle (address_line_3) by moving the last two address lines up (town_line and post_code_line).

So it's going to look like this:

house_name
house_number, street_name
town
post_code

The order of the address elements varies as well as occurrence of the empty lines. Because I am a beginner in Python I can only guess how to do it. If there is any other transformer in FME Workbench I can use, I welcome your ideas.

asked Oct 21, 2015 at 11:41
1
  • This may be of use. I hope this helps! Commented Oct 22, 2015 at 8:40

1 Answer 1

1

I solved this issue by adding 'Tester' and 'AttributeCreator' transformers instead of coding it in 'PythonCaller' transformer. In the Tester I selected 'line3' as a left value (transformers must be connected to see the attributes set previously) and empty string as a right value. In the AttributeCreator I set the lines in order and I added a NULL value for 'line5'.

answered Oct 22, 2015 at 8:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.