# Data Lineage when query/model in macro

**URL:** <https://discourse.getdbt.com/t/data-lineage-when-query-model-in-macro/540>\
**Category:** Archive\
**Created:** [August 26, 2019, 7:30pm UTC](https://discourse.getdbt.com/t/data-lineage-when-query-model-in-macro/540 "2019-08-26T19:30:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbb](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sbb](https://discourse.getdbt.com/u/sbb)\
**Post date:** [August 26, 2019, 7:30pm UTC](https://discourse.getdbt.com/t/data-lineage-when-query-model-in-macro/540/1 "2019-08-26T19:30:12Z")

</div>

Hi, I have a query/model that is inside a macro so that I can pass it parameters, which I then use in a ‘group by’ and in a calculation. It all works properly and is very DRY. However, this breaks the data lineage functionality - I can’t see anything before the macro.

Is there any way to fix data lineage in this situation and/or parameterize a query/model differently so that data lineage will work?

Thanks!
