Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Jul 6, 2024
1 parent 116201d commit a6eb2d2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
-a 'iris session iris -U %SYS "##class(Security.Users).UnExpireUserPasswords(\"*\")"'
- name: Run Tests
run: |
tox -e py38-iris,py39-iris,py310-iris,py311-iris
tox -e py38-iris,py39-iris,py310-iris,py311-iris -- --container containers.intersystems.com/intersystems/iris-community:latest
build:
needs:
Expand Down
16 changes: 8 additions & 8 deletions dbt/include/iris/macros/apply_grants.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
{% macro iris__get_show_grant_sql(relation) %}
select grantee,privilege_type
from (
select
r.ROLE_NAME grantee,
select
r.ROLE_NAME grantee,
pr.granted_by grantor,
pr.PRIVILEGE privilege_type,
$Piece(pr.NAME, '.', 1) table_schema,
$Piece(pr.NAME, '.', 2) table_name
$Piece(pr.NAME, '.', 1) table_schema,
$Piece(pr.NAME, '.', 2) table_name
from %SQL_Manager.Roles() r, %SQL_Manager.RolePrivileges(r.ROLE_NAME) pr
union all
select
u.USERNAME grantee,
select
u.USERNAME grantee,
pu.granted_by grantor,
pu.PRIVILEGE privilege_type,
$Piece(pu.NAME, '.', 1) table_schema,
$Piece(pu.NAME, '.', 2) table_name
$Piece(pu.NAME, '.', 1) table_schema,
$Piece(pu.NAME, '.', 2) table_name
from %SQL_Manager.Users() r, %SQL_Manager.UserPrivs(u.USERNAME) pu
) where grantor = $username
and grantee != $username
Expand Down
2 changes: 1 addition & 1 deletion dbt/include/iris/macros/materializations/view.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{#
{#

{% materialization view, adapter='iris' -%}
-- grab current tables grants config for comparision later on
Expand Down
2 changes: 1 addition & 1 deletion dbt/include/iris/macros/relations/view/replace.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@

{{ return({'relations': [target_relation]}) }}

{% endmacro %}
{% endmacro %}
4 changes: 1 addition & 3 deletions tests/functional/test_analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ def test_iris_analyses(self, project):
assert os.path.exists(path_1)
assert os.path.exists(path_2)

expected_sql = 'select * from "{}"."my_model"'.format(
project.test_schema
)
expected_sql = 'select * from "{}"."my_model"'.format(project.test_schema)
self.assert_contents_equal(path_1, expected_sql)
self.assert_contents_equal(path_2, "{% invalid jinja stuff %}")

0 comments on commit a6eb2d2

Please sign in to comment.