Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Pass file_format values as-is in external table configuration #1183

Commits on Sep 10, 2022

  1. fix: Pass file_format values as-is in external table configuration

    Common use of FILE_FORMAT under CREATE EXTERNAL TABLE includes specifying
    a previously created format name (FORMAT_NAME = 'NAME') or the various
    type options (TYPE=CSV FIELD_DELIMITER='|').
    
    Both of these require defining string literals with the single quote
    character (') that should not be escaped (\\').
    
    This change removes the escaping of single quotes performed for the
    file_format values to allow them to be specified without failing
    the query compilation.
    
    Some examples have also been added to the documentation
    to make it easier to understand how values for file_format
    need to be passed for external tables.
    
    Testing:
    
      - Modified unit tests to exercise passing of typical file format values
      - Ran 'make test' to confirm existing tests continue to pass
      - Setup a trial account, exported env-vars and ran 'make test-acceptance'
        and verified all tests passed
      - Attempted an external table creation on a personal account with the
        changes included through a local buildand observed it to execute a
        successful SQL. Tried with both FORMAT_NAME and FIELD_DELIMITER
        options with string literal values.
    
    Fixes Snowflake-Labs#1046
    sfc-gh-hachouraria committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    4b82042 View commit details
    Browse the repository at this point in the history