Last active
February 24, 2019 09:12
-
-
Save kovid-rathee/694126299a8b2c917397c953e76a4a25 to your computer and use it in GitHub Desktop.
Remove Invalid Characters (which are not accepted by Redshift)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop function if exists transformation_utils.remove_invalid_characters (p_string text); | |
create or replace function transformation_utils.remove_invalid_characters (p_string text) | |
returns text AS | |
$body$ | |
declare | |
c text; | |
begin | |
select replace(p_string,'�','') into c; | |
return c; | |
end; | |
$body$ | |
language 'plpgsql'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment