---
title: "Discussion on \"Writing Your First Macro in dbt – Practical Templates\" | Hashnode"
description: "Discussion on \"Writing Your First Macro in dbt – Practical Templates\". Once you’ve got your models, snapshots, and seeds up and running, you might start noticing some repeated SQL patterns in your dbt project.\nMaybe you’re calculating currency-converted revenue in multiple models. Or doing the same timestamp casting aga..."
url: "https://hashnode.com/posts/writing-your-first-macro-in-dbt-practical-templates/686cbb9ea495b0dee53748b6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Writing Your First Macro in dbt – Practical Templates](https://moderndataarchitect.hashnode.dev/writing-your-first-macro-in-dbt-practical-templates?utm_source=hashnode&utm_medium=feed)

Once you’ve got your models, snapshots, and seeds up and running, you might start noticing some repeated SQL patterns in your dbt project. Maybe you’re calculating currency-converted revenue in multiple models. Or doing the same timestamp casting aga...

Jul 8, 2025 · 3 min read · moderndataarchitect.hashnode.dev  
Read the article

-   [#dbt](https://hashnode.com/tag/dbt)
-   [#dbt-databuildtool](https://hashnode.com/tag/dbt-databuildtool)
-   [#macros](https://hashnode.com/tag/macros)
-   [#analytics](https://hashnode.com/tag/analytics)

## Written by

[Sriram Krishnan](https://hashnode.com/@sriramkrishnan)

@sriramkrishnan

  
[View profile](https://hashnode.com/@sriramkrishnan)

Data | BI Solutions Architect | AI

Sharing lessons, tools &amp; patterns to build scalable, modern data platforms —one post at a time.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
