Hi SAS Community,
Trying to upload data to Snow DB and I face an error because data has certain accented character. For e.g. certain foreign country name.
Will appreciate any guidance on this.
Thanks!
Welcome to the Community. When posting a problem, you should provide evidence of the process you are using and also the error messages you are getting. If the error is the result of running some SAS code, then post it using the "Insert SAS Code" icon. In your case, please post the complete Snowflake load SAS log including notes and error messages.
It would be useful to confirm what your SAS session encoding is. To support multiple languages it should be UTF-8. Run this to check:
proc options option = encoding;
run;
Hello,
Highly appreciate your prompt response. Here is the information you have asked for.
libname snowlib snow server="XXXXX.snowflakecomputing.com"
schema=my_test_schema
user='USER_ID'
pw='my_pw'
database='my_test_db'
warehouse='my_test_wh'
readbuff=32767
insertbuff=32767
dbcommit=0;
data snowlib.TEST_TABLE_IN_SNOWFLAKE;
set <input_sas_dataset_containing_foreign_characters>; run;
Error message in log is as below:
NOTE: There were 1 observations read from the data set <input_sas_dataset_containing_foreign_characters>.
ERROR: During insert: [Snowflake][Snowflake] (4) REST request for URL
https://XXXXX.snowflakecomputing.com:443/queries/v1/query-request?requestId=<removed>&request_guid=<removed>&clientStartTime=1723575891558 failed: HTTP error (http error) -
code=400.
NOTE: The data set snowlib.TEST_TABLE_IN_SNOWFLAKE has 0 observations and 10 variables.
Encoding is LATIN1 both on local and app server.
The type of problem you are getting is best progressed with Tech Support. Am I right in assuming you can write to Snowflake successfully if your data does not contain accented characters? My suspicion is that you will need to switch to using UTF-8 encoding in both SAS and Snowflake, but Tech Support should be able to provide a more definitive answer.
Found out that my data has some undesirable characters - I am using translate, compress function to remove those. Once those removed, I am able to load data. So far good. Thank you for your response to my questions.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.