Coder Social home page Coder Social logo

Comments (3)

BAntonellini avatar BAntonellini commented on September 28, 2024

@jaredx435k2d0 we understand your situation, but can't quote all table/column names by default. This can cause trouble with providers such as Snowflake, in which lower or upper casing must be strictly followed when using quotes.

i.e: you have a table named TEST_123
SELECT * FROM test_123 and SELECT * FROM TEST_123 are the same, while when using quotes you must enforce the correct uppercasing of the table name: SELECT * FROM "TEST_123" will work, and SELECT * FROM "test_123" wouldn't

With these details considered, we suggest each user to modify his/her templates at will and, in case you use keywords as table/column names (which we don't recomment), find the "template-way" of covering these cases.

from dbt-coves.

jaredx435k2d0 avatar jaredx435k2d0 commented on September 28, 2024

Understood.
I will note here that I'd anticipate this will be an issue for many users. The Fivetran connector for Salesforce, for example, will create a table called group and order for all users of that connector. This was the impetus for my request. There are also other instances of this.

That said, I understand your position on it and understand that all Fivetran Salesforce users can handle it on their end.

from dbt-coves.

noel avatar noel commented on September 28, 2024

yeah, I understand your point, but IMO it is a bad practice to use reserved words as table names. dont want
select * from "select" where "where" = 1 lol

Anyway, this seems like an edge case and it is far better to not quote things for the reason Bruno stated above than to force it.

So, there are a few options for a user:

  1. Manually quote the source table, since you would likely rename the staging table
  2. Change the dbt-coves template so all tables are quoted
  3. Quote the specific table with the problem

Let's see what others in the community think.

from dbt-coves.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.