sling-cli icon indicating copy to clipboard operation
sling-cli copied to clipboard

Transferring data using the Sling, source to destination works fine if the language is English, but if the language is different, it changes the data Current language is Arabic.

Open pawan-chauhan-9560 opened this issue 1 year ago • 2 comments

Issue Description

  • Description of the issue: Transferring data using the Sling, source to destination works fine if the language is English, but if the language is different, it changes the data Current language is Arabic. (Source and Destination column datatype is nvarchar(max))

  • Sling version : 1.2.13

  • Operating System : Linux

  • Replication Configuration:

source: SQL
target: SQL
streams:
/sling run --src-conn TestDB --src-stream 'dbo.appconfig' --tgt-object 'file:///opt/sling/appconfig/*.csv'

./sling run --src-stream 'file://opt/sling/appconfig/*.csv'  --src-options '{transforms: [remove_accents]}' --tgt-conn MY_TARGET_DB --tgt-object 'dbo.appconfig' --mode full-refresh
  ...
  • Log Output (please run command with -d):

data file for testing

KazakhstanImport.xlsx

pawan-chauhan-9560 avatar Jul 26 '24 14:07 pawan-chauhan-9560

It seems that when SQL server uses BCP, the option -c is hard-coded in database_sqlserver.go. If we could use -w it should work.

durlabhjain avatar Jul 29 '24 15:07 durlabhjain

Ah ok, thanks, that makes sense, will make that change for next version. @pawan-chauhan-9560 can you change this to -w, build the binary and give it a try? See README on how to compile the binary (just need to install go).

flarco avatar Jul 29 '24 20:07 flarco

I just pushed a fix which I think works. Can you try it with the latest dev build? See links here: https://github.com/slingdata-io/sling-cli?tab=readme-ov-file#automated-dev-builds

flarco avatar Sep 09 '24 13:09 flarco

Closing, feel free to reopen.

flarco avatar Sep 09 '24 13:09 flarco