# Why does Jinja parse the commented-out macros in SQL queries?

**URL:** <https://discourse.getdbt.com/t/why-does-jinja-parse-the-commented-out-macros-in-sql-queries/4708>\
**Category:** Help\
**Tags:** jinja\
**Created:** [August 4, 2022, 11:51am UTC](https://discourse.getdbt.com/t/why-does-jinja-parse-the-commented-out-macros-in-sql-queries/4708 "2022-08-04T11:51:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![msat59](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@msat59](https://discourse.getdbt.com/u/msat59)\
**Post date:** [August 4, 2022, 11:51am UTC](https://discourse.getdbt.com/t/why-does-jinja-parse-the-commented-out-macros-in-sql-queries/4708/1 "2022-08-04T11:51:43Z")

</div>

I tried to comment and keep my old macro code, but dbt failed to compile the macro.  
The problem is that **Jinja** parses the commented-out lines and finds `{{}}` in the query so shows an error message.

```auto
{% macro markup(column1, column2) %}
({{column1}} - {{column2}})/{{column2}}
{% endmacro %}

/*
{% macro markup(x, y) %}
({{x}} - {{y}})/{{y}}
{% endmacro %}
*/

```

The same problem happens if I comment out the macro in the main SQL query and don’t keep any commented code in the macro.sql file.

```auto
select *
--, {{ markup('ordersellingprice', 'ordercostprice') }} as markup
from {{ ref('raw_orders') }} as o

```

**Jinja must not parse the commented lines**.

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.getdbt.com/u/Dom)\
**Post date:** [August 7, 2022, 7:15pm UTC](https://discourse.getdbt.com/t/why-does-jinja-parse-the-commented-out-macros-in-sql-queries/4708/2 "2022-08-07T19:15:46Z")

</div>

Jinja context should be commented out with {# … #}
