-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More acceptance tests relevant to table permissions (#101)
* More acceptance tests relevant to table permissions * lil tweakz * backfill expectations for currently broken stuff * More data driven * support raw errors * Better comments * Fixups * Kondo
- Loading branch information
1 parent
671f3a6
commit f69ba62
Showing
20 changed files
with
120 additions
and
53 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
12 changes: 12 additions & 0 deletions
12
test/resources/acceptance/bigquery__table_wildcard.analysis.edn
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{:source-columns [] | ||
:tables ::not-sure-what-we-should-do-if-we-continue-supporting-this | ||
|
||
:overrides | ||
{:basic-select | ||
;; do not allow wildcard selects | ||
{:error :macaw.error/illegal-expression} | ||
|
||
;; Just plain old wacky | ||
:source-columns [{:table "`project_id.dataset_id.table_*`", :column "_TABLE_SUFFIX"}] | ||
;; Kinda makes sense, but very raw, and Metabase won't handle it. | ||
:tables [{:table "`project_id.dataset_id.table_*`"}]}} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SELECT | ||
* | ||
FROM | ||
`project_id.dataset_id.table_*` | ||
WHERE | ||
_TABLE_SUFFIX BETWEEN '20230101' AND '20230131' | ||
LIMIT 1000; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{:source-columns [{:table "usage-stats" :column "instance_started"} | ||
{:table "usage-stats" :column "month_started"} | ||
{:table "usage-stats" :column "instance_finished"}] | ||
:tables [{:table "usage_stats"}] | ||
:overrides :macaw.error/unable-to-parse} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{:source-columns [{:table "execution" :column "error"} | ||
{:table "execution" :column "instance_id"} | ||
{:table "execution" :column "running_time"}] | ||
:tables [{:table "execution"}] | ||
:overrides :macaw.error/unable-to-parse} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
OPEN ccur FOR | ||
'select c.category | ||
from ' || TABLE_NAME || ' c | ||
where c.deptid=' || PI_N_Dept || | ||
' and c.category not in ('|| sExcludeCategories ||')'; |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{:source-columns [{:table "invoice" :column "amount_paid_cents"} | ||
{:table "invoice" :column "id"} | ||
{:table "invoice" :column "is_deleted"}] | ||
:tables [{:table "invoice"}]} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{:source-columns [{:table "user" :column "id"} | ||
{:table "user" :column "name"}] | ||
:tables [{:table "user"}] | ||
:overrides | ||
{:basic-select :macaw.error/illegal-expression}} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELECT id, name | ||
INTO new_user_summary | ||
FROM user; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{:has-wildcard? true | ||
:source-columns [] | ||
:tables [{:table "t"}]} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
SELECT * FROM t; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{:error :macaw.error/illegal-expression | ||
:overrides :macaw.error/unable-to-parse} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
EXECUTE stmt; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{:error :macaw.error/illegal-expression | ||
:overrides :macaw.error/unable-to-parse} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
EXEC sp_executesql @SQL |