Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non UTF-8 Encoding for Sources #13

Closed
dluftspring opened this issue Sep 25, 2023 · 4 comments
Closed

Support non UTF-8 Encoding for Sources #13

dluftspring opened this issue Sep 25, 2023 · 4 comments

Comments

@dluftspring
Copy link

For both file and database sources it would be great if you could support non utf-8 encoding as a configuration option

@flarco
Copy link
Collaborator

flarco commented Sep 25, 2023

Not sure if this is feasible... What types of non-utf8 encodings are you thinking of?

@dluftspring
Copy link
Author

latin-1 is the one I encounter most but I understand if this isn't worth pursuing or isn't possible. At a certain point you can just say data in the databases should be utf-8 and there should be processes to make sure weird characters don't get in there

@flarco
Copy link
Collaborator

flarco commented Sep 26, 2023

Hey, I pre-released a new version: https://github.com/slingdata-io/sling-cli/releases/tag/v1.0.31
Can you download the binary, test and let me know if it works? You can use the transforms: [ decode_latin1 ] option like this:

source: SNOWFLAKE_DEV
target: DOCKER_POSTGRES

defaults:
  mode: truncate
  source_options:
    transforms: [ decode_latin1 ]

streams:
  snowflake_schema.snowflake_table:
    object: public.my_postgres_table

Here are the options: https://github.com/slingdata-io/sling-cli/blob/main/core/sling/tranforms.go#L20-L27

@dluftspring
Copy link
Author

Testing with the pre-release this looks like it's working properly to me!

@flarco flarco closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants