# In-Depth Discussions

**URL:** https://discourse.getdbt.com/c/discussions/21.md

[Latest](https://discourse.getdbt.com/latest.md) · [Categories](https://discourse.getdbt.com/categories.md) · [Tags](https://discourse.getdbt.com/tags.md)

---

## [About the Discussion category](https://discourse.getdbt.com/t/about-the-discussion-category/4874)

<div class="topic-metadata">

**Author:** [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Replies:** 0

</div>

For questions that might not have a single correct answer, and long-lived discussions about dbt or analytics engineering at large. Share best practices, something cool you learned or a new way you’re thinking about somet…

---

## [semantic layer sql](https://discourse.getdbt.com/t/semantic-layer-sql/18747)

<div class="topic-metadata">

**Author:** [@rpwils98](https://discourse.getdbt.com/u/rpwils98)\
**Replies:** 2\
**Last updated:** [October 22, 2026, 2:35pm UTC](https://discourse.getdbt.com/t/semantic-layer-sql/18747 "2026-10-22T14:35:34Z")

</div>

Hi, I wanted to know if when using the api is it possible to get the sql that is generated by the semantic layer without running the sql.

---

## [Combining different materialization models in 1 table](https://discourse.getdbt.com/t/combining-different-materialization-models-in-1-table/8893)

<div class="topic-metadata">

**Author:** [@Yaryshevskiy](https://discourse.getdbt.com/u/Yaryshevskiy)\
**Replies:** 1\
**Last updated:** [October 12, 2026, 7:03am UTC](https://discourse.getdbt.com/t/combining-different-materialization-models-in-1-table/8893 "2026-10-12T07:03:16Z")

</div>

Hello dbt community, I m facing an interesting challenge and looks to receive advices/stories on how to approach this challenge. In Snowflake which is the main database Im having multiple source tables each of them bei…

---

## [Authenticating dbt Core to Amazon Redshift using Keycloak](https://discourse.getdbt.com/t/authenticating-dbt-core-to-amazon-redshift-using-keycloak/20976)

<div class="topic-metadata">

**Author:** [@Luca87](https://discourse.getdbt.com/u/Luca87)\
**Replies:** 0\
**Last updated:** [September 4, 2026, 3:05pm UTC](https://discourse.getdbt.com/t/authenticating-dbt-core-to-amazon-redshift-using-keycloak/20976 "2026-09-04T15:05:33Z")

</div>

Hi everyone, We want to use Keycloak as the only identity source for users running dbt Core against Amazon Redshift. Each user should: Authenticate through Keycloak. Connect to Redshift from dbt using temporary crede…

---

## [Is there a recommended approach to do SAST (Static application security testing ) and/or SCA ( software composition testing ) over the dbt code or packages used ?](https://discourse.getdbt.com/t/is-there-a-recommended-approach-to-do-sast-static-application-security-testing-and-or-sca-software-composition-testing-over-the-dbt-code-or-packages-used/20928)

<div class="topic-metadata">

**Author:** [@rakesh.kesavan](https://discourse.getdbt.com/u/rakesh.kesavan)\
**Replies:** 0\
**Last updated:** [August 17, 2026, 9:43am UTC](https://discourse.getdbt.com/t/is-there-a-recommended-approach-to-do-sast-static-application-security-testing-and-or-sca-software-composition-testing-over-the-dbt-code-or-packages-used/20928 "2026-08-17T09:43:45Z")

</div>

For large scale use of dbt cloud , it will be important to have automatic way to test the code for security vulnerabilities in code and also in the packages used , is there is a recommended approach here ?

---

## [dbt Fusion and \`static\_analysis\`](https://discourse.getdbt.com/t/dbt-fusion-and-static-analysis/19673)

<div class="topic-metadata">

**Author:** [@pempey](https://discourse.getdbt.com/u/pempey)\
**Replies:** 8\
**Last updated:** [August 6, 2026, 4:00am UTC](https://discourse.getdbt.com/t/dbt-fusion-and-static-analysis/19673 "2026-08-06T04:00:16Z")

</div>

I have been having a discussion about the static\_analysis config in the dbt Fusion engine on the #dbt-fusion-engine Slack channel but I want to bring the discussion to a wider audience. I will link to the thread but it …

---

## [Managing sensitive data access in a shared dbt repository](https://discourse.getdbt.com/t/managing-sensitive-data-access-in-a-shared-dbt-repository/20855)

<div class="topic-metadata">

**Author:** [@evellyn.natalee](https://discourse.getdbt.com/u/evellyn.natalee)\
**Replies:** 0\
**Last updated:** [July 2, 2026, 10:43pm UTC](https://discourse.getdbt.com/t/managing-sensitive-data-access-in-a-shared-dbt-repository/20855 "2026-07-02T22:43:53Z")

</div>

Hi everyone, I’m looking for some insights on how to manage sensitive data access in a shared data warehouse project. The Problem We have a Kimball-style data warehouse repository managed with dbt. We are planning to a…

---

## [Offical Doc return Understanding](https://discourse.getdbt.com/t/offical-doc-return-understanding/20818)

<div class="topic-metadata">

**Author:** [@aditya](https://discourse.getdbt.com/u/aditya)\
**Replies:** 0\
**Last updated:** [June 5, 2026, 11:27am UTC](https://discourse.getdbt.com/t/offical-doc-return-understanding/20818 "2026-06-05T11:27:00Z")

</div>

so I am referring this link ( About return function | dbt Developer Hub ) to understand the diff between {{ return() }} and {% do return() %} I used like this ---- macro {% macro get\_cols() %} {{- return(\[‘user\_id’, …

---

## [Interpretation of the intermediate layer](https://discourse.getdbt.com/t/interpretation-of-the-intermediate-layer/20816)

<div class="topic-metadata">

**Author:** [@tea](https://discourse.getdbt.com/u/tea)\
**Replies:** 0\
**Last updated:** [June 3, 2026, 11:27am UTC](https://discourse.getdbt.com/t/interpretation-of-the-intermediate-layer/20816 "2026-06-03T11:27:30Z")

</div>

We are migrating from a SQL Server database project to dbt, and are in the process of establishing naming conventions and folder structure for our new dbt project. We have read the best practice guidelines for project s…

---

## [Struct evolution handleing in dbt snapshot](https://discourse.getdbt.com/t/struct-evolution-handleing-in-dbt-snapshot/20805)

<div class="topic-metadata">

**Author:** [@aniketmane.85](https://discourse.getdbt.com/u/aniketmane.85)\
**Replies:** 0\
**Last updated:** [May 26, 2026, 8:46pm UTC](https://discourse.getdbt.com/t/struct-evolution-handleing-in-dbt-snapshot/20805 "2026-05-26T20:46:44Z")

</div>

So we are using dbt snapshot to get snapshot of source data and data has some column with struct data type. Now recently our snaoshot job failed as schema of this struct got changed.. basically added few more keys..causi…

---

## [Looker to DBT connections and drawbacks](https://discourse.getdbt.com/t/looker-to-dbt-connections-and-drawbacks/20804)

<div class="topic-metadata">

**Author:** [@akshat1](https://discourse.getdbt.com/u/akshat1)\
**Replies:** 0\
**Last updated:** [May 25, 2026, 8:09am UTC](https://discourse.getdbt.com/t/looker-to-dbt-connections-and-drawbacks/20804 "2026-05-25T08:09:16Z")

</div>

How do we connect dbt to looker what i mean to say is suppose if we are writing any liquid in look ML and we are pushing it to dbt how would it look like ? and also what are the limitations in this

---

## [Are full MD5 hashes a good default for surrogate keys?](https://discourse.getdbt.com/t/are-full-md5-hashes-a-good-default-for-surrogate-keys/20797)

<div class="topic-metadata">

**Author:** [@anderspoirel](https://discourse.getdbt.com/u/anderspoirel)\
**Replies:** 0\
**Last updated:** [May 17, 2026, 10:55pm UTC](https://discourse.getdbt.com/t/are-full-md5-hashes-a-good-default-for-surrogate-keys/20797 "2026-05-17T22:55:23Z")

</div>

dbt’s generate\_surrogate\_key macro takes a MD5 hash of the input columns and returns it as a string. I would expect string keys to perform worse than 64-bit integer keys in joins due to their larger size. In my benchmark…

---

## [Always get headache about schemas](https://discourse.getdbt.com/t/always-get-headache-about-schemas/20775)

<div class="topic-metadata">

**Author:** [@ljy565099099](https://discourse.getdbt.com/u/ljy565099099)\
**Replies:** 0\
**Last updated:** [May 5, 2026, 9:56am UTC](https://discourse.getdbt.com/t/always-get-headache-about-schemas/20775 "2026-05-05T09:56:29Z")

</div>

Black box is another nightmare of table schemas. People come and go, in result some services or code bases become THE BLACK BOX. It works without documentations and no one knows how it works. Then, few people knows the m…

---

## [Newbie in dbt we discuss about data migration tool to complement dbt](https://discourse.getdbt.com/t/newbie-in-dbt-we-discuss-about-data-migration-tool-to-complement-dbt/20758)

<div class="topic-metadata">

**Author:** [@LtRogers5](https://discourse.getdbt.com/u/LtRogers5)\
**Replies:** 1\
**Last updated:** [April 24, 2026, 6:11am UTC](https://discourse.getdbt.com/t/newbie-in-dbt-we-discuss-about-data-migration-tool-to-complement-dbt/20758 "2026-04-24T06:11:05Z")

</div>

The first question is. Does dbt needs to be complemented with a tool like Python alchemy, DbUp, FLyway, Liquibase, … to handle db changes, like increase column length, add a new column or maybe do a drop create to add a …

---

## [model.path results in VS Code on Windows has back slashes and includes the 'models' node](https://discourse.getdbt.com/t/model-path-results-in-vs-code-on-windows-has-back-slashes-and-includes-the-models-node/20739)

<div class="topic-metadata">

**Author:** [@patercook](https://discourse.getdbt.com/u/patercook)\
**Replies:** 0\
**Last updated:** [April 16, 2026, 5:22pm UTC](https://discourse.getdbt.com/t/model-path-results-in-vs-code-on-windows-has-back-slashes-and-includes-the-models-node/20739 "2026-04-16T17:22:03Z")

</div>

So far, I have run into two issues when attempting to migrate to Windows VS Code/fusion from Studio. When utilizing model.path in a macro, the results in VS Code: Has back slashes instead of slashes Includes the ‘mode…

---

## [Semantic Layer vs. Text-to-SQL: 2026 Benchmark Update](https://discourse.getdbt.com/t/semantic-layer-vs-text-to-sql-2026-benchmark-update/20721)

<div class="topic-metadata">

**Author:** [@system](https://discourse.getdbt.com/u/system)\
**Replies:** 1\
**Last updated:** [April 13, 2026, 4:41pm UTC](https://discourse.getdbt.com/t/semantic-layer-vs-text-to-sql-2026-benchmark-update/20721 "2026-04-13T16:41:16Z")

</div>

This is a companion discussion topic for the original entry at Semantic Layer vs. Text-to-SQL: 2026 Benchmark Update | dbt Developer Blog

---

## [How do teams keep column documentation usable at scale?](https://discourse.getdbt.com/t/how-do-teams-keep-column-documentation-usable-at-scale/20626)

<div class="topic-metadata">

**Author:** [@sildatam](https://discourse.getdbt.com/u/sildatam)\
**Replies:** 2\
**Last updated:** [April 8, 2026, 3:52am UTC](https://discourse.getdbt.com/t/how-do-teams-keep-column-documentation-usable-at-scale/20626 "2026-04-08T03:52:08Z")

</div>

Curious how analytics teams actually manage column-level documentation in practice. Where do descriptions and business definitions usually live? dbt docs, a catalog, spreadsheets, somewhere else? And if someone had to…

---

## [Why are CI jobs ("state" method) building more/less models/nodes than expected?](https://discourse.getdbt.com/t/why-are-ci-jobs-state-method-building-more-less-models-nodes-than-expected/7504)

<div class="topic-metadata">

**Author:** [@jeremyyeo](https://discourse.getdbt.com/u/jeremyyeo)\
**Replies:** 4\
**Last updated:** [March 13, 2026, 5:53pm UTC](https://discourse.getdbt.com/t/why-are-ci-jobs-state-method-building-more-less-models-nodes-than-expected/7504 "2026-03-13T17:53:18Z")

</div>

Note: Recent dbt versions have introduced a new behaviour change flag state\_modified\_compare\_more\_unrendered\_values Behavior changes | dbt Developer Hub which will avoid some of the false positives discussed in this ar…

---

## [Make your AI better at data work with dbt's agent skills](https://discourse.getdbt.com/t/make-your-ai-better-at-data-work-with-dbts-agent-skills/20575)

<div class="topic-metadata">

**Author:** [@system](https://discourse.getdbt.com/u/system)\
**Replies:** 2\
**Last updated:** [March 5, 2026, 6:47pm UTC](https://discourse.getdbt.com/t/make-your-ai-better-at-data-work-with-dbts-agent-skills/20575 "2026-03-05T18:47:30Z")

</div>

This is a companion discussion topic for the original entry at Make your AI better at data work with dbt's agent skills | dbt Developer Blog

---

## [Snowflake Streams with DBT](https://discourse.getdbt.com/t/snowflake-streams-with-dbt/8314)

<div class="topic-metadata">

**Author:** [@os15](https://discourse.getdbt.com/u/os15)\
**Replies:** 8\
**Last updated:** [February 23, 2026, 8:47am UTC](https://discourse.getdbt.com/t/snowflake-streams-with-dbt/8314 "2026-02-23T08:47:03Z")

</div>

Hi, We are in the process of assessing our orchestration tool for modelling within in Snowflake. I have used Snowflake and dbt in the past together but couldn’t find a way to leverage the two and their strengths togeth…

---

## [Modernizing the Semantic Layer Spec](https://discourse.getdbt.com/t/modernizing-the-semantic-layer-spec/20550)

<div class="topic-metadata">

**Author:** [@system](https://discourse.getdbt.com/u/system)\
**Replies:** 1\
**Last updated:** [February 18, 2026, 7:38am UTC](https://discourse.getdbt.com/t/modernizing-the-semantic-layer-spec/20550 "2026-02-18T07:38:20Z")

</div>

This is a companion discussion topic for the original entry at Modernizing the Semantic Layer Spec | dbt Developer Blog

---

## [Multi project structure, global macros and packages](https://discourse.getdbt.com/t/multi-project-structure-global-macros-and-packages/20583)

<div class="topic-metadata">

**Author:** [@sigjons](https://discourse.getdbt.com/u/sigjons)\
**Replies:** 1\
**Last updated:** [February 16, 2026, 6:46pm UTC](https://discourse.getdbt.com/t/multi-project-structure-global-macros-and-packages/20583 "2026-02-16T18:46:24Z")

</div>

Hi. We are setting up a fairly large data flow architecture in dbt-core. For privacy reasons, we need to land each datasource/data provider in a specific staging database. We will then combine them in the silver layer l…

---

## [Using hooks (Pre and Post) in a model run with Incremental strategy of Delete + Insert : Best practices and performance considerations](https://discourse.getdbt.com/t/using-hooks-pre-and-post-in-a-model-run-with-incremental-strategy-of-delete-insert-best-practices-and-performance-considerations/20552)

<div class="topic-metadata">

**Author:** [@Shivadr](https://discourse.getdbt.com/u/Shivadr)\
**Replies:** 0\
**Last updated:** [January 22, 2026, 5:49am UTC](https://discourse.getdbt.com/t/using-hooks-pre-and-post-in-a-model-run-with-incremental-strategy-of-delete-insert-best-practices-and-performance-considerations/20552 "2026-01-22T05:49:32Z")

</div>

Hello All, I am new to dbt and would help from your inputs on the following problem statement. We have our final fact table on Data mart on Snowflake that is being refreshed incrementally using Delete + Insert strategy.…

---

## [How to deal with a 1:1 relationship between Dimension and Fact tables?](https://discourse.getdbt.com/t/how-to-deal-with-a-1-1-relationship-between-dimension-and-fact-tables/20442)

<div class="topic-metadata">

**Author:** [@samjoe](https://discourse.getdbt.com/u/samjoe)\
**Replies:** 1\
**Last updated:** [January 18, 2026, 12:22am UTC](https://discourse.getdbt.com/t/how-to-deal-with-a-1-1-relationship-between-dimension-and-fact-tables/20442 "2026-01-18T00:22:01Z")

</div>

I’m designing a Kimball-style data warehouse. My fact table has the grain: 1 row per user per transaction. Each transaction ID appears only once in the fact table. The transaction itself has ~15 descriptive attributes (…

---

## [depends\_on syntax use for Upstream model](https://discourse.getdbt.com/t/depends-on-syntax-use-for-upstream-model/20475)

<div class="topic-metadata">

**Author:** [@sober](https://discourse.getdbt.com/u/sober)\
**Replies:** 1\
**Last updated:** [December 3, 2025, 7:39pm UTC](https://discourse.getdbt.com/t/depends-on-syntax-use-for-upstream-model/20475 "2025-12-03T19:39:19Z")

</div>

I have a problem. I need to use upstream target (Fact) table to know the latest date data entry. I want to use that information in Downstream Staging table. I tried to use depends\_on clause in Downstream model but it is …

---

## [Aggregate Awareness in Semantic Layer](https://discourse.getdbt.com/t/aggregate-awareness-in-semantic-layer/18879)

<div class="topic-metadata">

**Author:** [@imsamant](https://discourse.getdbt.com/u/imsamant)\
**Replies:** 2\
**Last updated:** [October 9, 2026, 12:10pm UTC](https://discourse.getdbt.com/t/aggregate-awareness-in-semantic-layer/18879 "2026-10-09T12:10:35Z")

</div>

It would be great if dbt had some way of supporting Aggregate Awareness. i.e. if there is a model in day level, and an aggregate model in week level, depending on whether the query is in day, week, or month level, if dbt…

---

## [How could a natural language layer sit on top of dbt models?](https://discourse.getdbt.com/t/how-could-a-natural-language-layer-sit-on-top-of-dbt-models/20431)

<div class="topic-metadata">

**Author:** [@canongun](https://discourse.getdbt.com/u/canongun)\
**Replies:** 0\
**Last updated:** [November 17, 2025, 2:38pm UTC](https://discourse.getdbt.com/t/how-could-a-natural-language-layer-sit-on-top-of-dbt-models/20431 "2025-11-17T14:38:46Z")

</div>

Hello everyone, I’m attempting to figure out how TableFirst, a tool I’m working on, might fit into processes that already employ dbt. The idea is to let non-technical users describe the table they want in natural langu…

---

## [Surrogate keys in dbt: Integers or hashes?](https://discourse.getdbt.com/t/surrogate-keys-in-dbt-integers-or-hashes/6684)

<div class="topic-metadata">

**Author:** [@system](https://discourse.getdbt.com/u/system)\
**Replies:** 8\
**Last updated:** [November 5, 2025, 9:33am UTC](https://discourse.getdbt.com/t/surrogate-keys-in-dbt-integers-or-hashes/6684 "2025-11-05T09:33:40Z")

</div>

This is a companion discussion topic for the original entry at Surrogate keys in dbt: Integers or hashes? | dbt Developer Blog

---

## [2 step processing of streaming data with dbt incrementals](https://discourse.getdbt.com/t/2-step-processing-of-streaming-data-with-dbt-incrementals/20358)

<div class="topic-metadata">

**Author:** [@mate](https://discourse.getdbt.com/u/mate)\
**Replies:** 1\
**Last updated:** [October 27, 2025, 5:31pm UTC](https://discourse.getdbt.com/t/2-step-processing-of-streaming-data-with-dbt-incrementals/20358 "2025-10-27T17:31:59Z")

</div>

Hello dbt Community, I want process streaming data with dbt incremental models in two steps. The data comes from a Kafka Topic and is loaded into a Snowflake Database (via Snowpipe Streaming). The table (R1) holds the r…

---

## [dbt-fusion support for variables?](https://discourse.getdbt.com/t/dbt-fusion-support-for-variables/20349)

<div class="topic-metadata">

**Author:** [@mark.pretoria](https://discourse.getdbt.com/u/mark.pretoria)\
**Replies:** 0\
**Last updated:** [October 23, 2025, 3:58am UTC](https://discourse.getdbt.com/t/dbt-fusion-support-for-variables/20349 "2025-10-23T03:58:04Z")

</div>

Hi we are testing a large dbt model from core to fusion and have found a number of issues? we have a number of variables which crash the cll? will this be a available in next release?

[Next page](https://discourse.getdbt.com/c/discussions/21.md?page=1)
