dbt-labs / dbt-adapters

Apache License 2.0
17 stars 20 forks source link

Change the default behavior of `get_show_sql` to avoid wrapping in subquery #207

Closed jtcohen6 closed 2 weeks ago

jtcohen6 commented 2 months ago

Context:

Implementation:

{% macro get_show_sql(compiled_code, sql_header, limit) -%}
  {%- if sql_header -%}
  {{ sql_header }}
  {%- endif -%}
  {{ compiled_code }}
  {% if limit is not none %}
  limit {{ limit }}
  {%- endif -%}
{% endmacro %}

Acceptance tests:

jtcohen6 commented 2 months ago

From estimation:

VersusFacit commented 2 weeks ago

See merge comments in #team-dev-adapters