Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC Server: Support macros in execute and compile tasks #1372

Closed
drewbanin opened this issue Mar 25, 2019 · 0 comments
Closed

RPC Server: Support macros in execute and compile tasks #1372

drewbanin opened this issue Mar 25, 2019 · 0 comments
Labels
rpc Issues related to dbt's RPC server

Comments

@drewbanin
Copy link
Contributor

Feature

Feature description

The RPC Server compile/ and execute/ endpoints should accept macros defined inline in raw SQL. Our current strategy of sending the same text to the macros and sql arguments of the endpoints doesn't work because of the macro cache. The following query results in maximum recursion depth exceeded:

{{ test_macros() }}

{% macro test_macros() %}
  1
{% endmacro %}

The reason this happens is because we re-parse the entire contents of the macro file at runtime, so we end up in an infinite recursion scenario.

@drewbanin drewbanin added this to the Wilt Chamberlain milestone Mar 25, 2019
@drewbanin drewbanin added the rpc Issues related to dbt's RPC server label Mar 25, 2019
@drewbanin drewbanin mentioned this issue Mar 25, 2019
5 tasks
beckjake added a commit that referenced this issue Mar 26, 2019
…s-models

Support macros in execute/compile tasks (#1372)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpc Issues related to dbt's RPC server
Projects
None yet
Development

No branches or pull requests

1 participant