-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Security Foundation Initiative to make fabric adapter safer. * Configuring integration tests with Open Connection ID as part of Security Foundation Initiative. * configuring local tests to run on user credentials. Dropping a relation correctly based on its type * Addressing #243, #221, #228, #229, #232, #235 issues. * Updated test helper with ephemeral. * Updated unit tests * Updated get_pyodbc_attrs_before_credentials method * include only lines that start with order by -- dbt show
- Loading branch information
Showing
14 changed files
with
148 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
{% macro fabric__get_limit_sql(sql, limit) %} | ||
|
||
{% if limit == -1 or limit is none %} | ||
{% if sql.strip().lower().startswith('with') %} | ||
{{ sql }} | ||
{% else -%} | ||
select * | ||
from ( | ||
{{ sql }} | ||
) as model_limit_subq | ||
{%- endif -%} | ||
{% else -%} | ||
{% if sql.strip().lower().startswith('with') %} | ||
{{ sql }} order by (select null) | ||
offset 0 rows fetch first {{ limit }} rows only | ||
{% else -%} | ||
select * | ||
from ( | ||
{{ sql }} | ||
) as model_limit_subq order by (select null) | ||
offset 0 rows fetch first {{ limit }} rows only | ||
{%- endif -%} | ||
{%- if limit == -1 or limit is none -%} | ||
{{ sql }} | ||
{#- Special processing if the last non-blank line starts with order by -#} | ||
{%- elif sql.strip().splitlines()[-1].strip().lower().startswith('order by') -%} | ||
{{ sql }} | ||
offset 0 rows fetch first {{ limit }} rows only | ||
{%- else -%} | ||
{{ sql }} | ||
order by (select null) offset 0 rows fetch first {{ limit }} rows only | ||
{%- endif -%} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.