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

Contract add quoting for identifiers #2108

Open
tombaeyens opened this issue Jun 26, 2024 · 1 comment
Open

Contract add quoting for identifiers #2108

tombaeyens opened this issue Jun 26, 2024 · 1 comment
Assignees
Labels
contract Data contracts

Comments

@tombaeyens
Copy link
Contributor

tombaeyens commented Jun 26, 2024

Soda Core currently has a confusing way to deal with case sensitivity. By default the soda core engine tries to be neutral. If you don't quote in the YAML, the generated queries will also not be quoted. But some databases have default uppercasing strategy (snowflake) and others have a default lower casing strategy (portgres) if no quotes are provided. That is confusing.

The original goal was to be developer friendly and produce easy to read queries. And not requiring quotes lead to easier readable queries. But that goal is less important compared to making it work.

Also in contracts, we want the * exact * case as is in the warehouse / data source. Contracts can only have true value if they represent the metadata precisely.

So in order to achieve that, we need to ensure that we always ensure quotes and fully qualify the names in the queries we generate.

@see sodadata/docs#812

Test contracts that require database-specific quoting. Like for case sensitive table and columns names.
Also column names with spaces should be tested.

@tombaeyens tombaeyens added the contract Data contracts label Jun 26, 2024
@tombaeyens tombaeyens self-assigned this Jun 26, 2024
@tools-soda
Copy link

SAS-3765

@tombaeyens tombaeyens moved this to Todo in Contracts Jun 26, 2024
@tombaeyens tombaeyens changed the title Test contracts with spaces and quoting Contract add quoting for identifiers Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contract Data contracts
Projects
Status: Goals
Development

No branches or pull requests

2 participants