- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.