Problem Note 70901: Snowflake character column lengths might not be shortened with the SCANSTRINGS=YES LIBNAME or Data Set options
Using the SQL procedure to read in a Snowflake table with the SCANSTRINGS=yes LIBNAME or data set options might not reduce the lengths of character variables when the query includes one of the following:
- DISTINCT keyword
- ORDER BY clause
- a join
- aggregate functions (MIN, MAX, SUM, COUNT, FREQ, AVG, MEAN) or the COALESCE function
- HAVING clause
- SET operator other than an OUTER UNION
- WHERE clause containing a sub-query, referencing a database management system (DBMS) table using the same libref
Instead, the length of the column remains as defined in the database or at 32,767 if the defined length is longer.
This issue can result in slower performance, and the resulting data set needs more space for storage.
A workaround is to use explicit pass-through with the SQL procedure.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Note: The hot fix addresses issues when the Snowflake table contains only one column. See SAS Note 71029 for issues when there is more than one column in the table. In addition, see SAS KB0042067 for issues where column lengths might not be shortened when renaming columns with the SQL procedure.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to Snowflake (on SAS Viya) | Linux for x64 | 2020.0.5 | Stable 2024.08 | Viya platform | Viya |
| SAS System | SAS/ACCESS Interface to Snowflake | Linux for x64 | 9.42 | 9.48 | 9.4 TS1M7 | 9.4 TS1M9 |
| Microsoft® Windows® for x64 | 9.42 | 9.48 | 9.4 TS1M7 | 9.4 TS1M9 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | high |
| Date Modified: | 2025-12-15 13:12:37 |
| Date Created: | 2024-07-23 13:42:18 |