Ask Your Question
1

Special characters (accent, apostrophe, trema) work in custom Source tests, but no longer when deployed in dockerized Streamsets

asked 2019-01-22 08:03:47 -0500

nnuytten gravatar image

I've written a custom Streamsets origin. Some of the records contain characters like é or ë. When running my automated tests I can validate that the data is emitted as a list of SDC Records as intended.

When I use my custom origin in a pipeline on a dockerized Streamsets Data Collector however, all of those special characters are displayed in the UI (preview) and pushed to my Target as '?'.

Is Streamsets interpreting the output of my origin and applying some character encoding?

edit retag flag offensive close merge delete

Comments

It's most likely some difference between the two environments. Have you tried Data Collector on the same machine as your automated tests?

metadaddy gravatar imagemetadaddy ( 2019-01-22 11:39:00 -0500 )edit

Are you able to share your code (or at least some code that reproduces the problem) via GitHub or similar? I might be able to take a look in the debugger and see what's happening.

metadaddy gravatar imagemetadaddy ( 2019-01-23 15:42:32 -0500 )edit
1

Hey Pat, I was able to fix it today. Problem was as you indicated in the environment. Alpine and locale settings are terrible. I'll document it in the answer. Thanks for your pointer!

nnuytten gravatar imagennuytten ( 2019-01-23 16:10:04 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2019-01-23 16:12:48 -0500

nnuytten gravatar image

The problem was not in the custom origin or Streamsets at all, rather it was an issue with the Docker container itself. The official Streamsets container from which I inherit, is based on Alpine Linux. No locale support is installed by default, so the trick is to add it by yourself.

This post helped me out in installing it in my container and configuring the container. Afterwards, all worked as expected.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-22 08:03:47 -0500

Seen: 66 times

Last updated: Jan 23