-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v0.11.0 release --------- Co-authored-by: TJ Murphy <[email protected]>
- Loading branch information
Showing
31 changed files
with
669 additions
and
85 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"database_role": "STATIC_DATABASE.STATIC_DATABASE_ROLE", | ||
"to_role": "STATIC_ROLE", | ||
"to_database_role": null | ||
} |
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,11 @@ | ||
{ | ||
"name": "some_masking_policy", | ||
"args": [ | ||
{"name": "val", "data_type": "VARCHAR"} | ||
], | ||
"returns": "VARCHAR(16777216)", | ||
"body": "CASE WHEN current_role() IN ('ANALYST') THEN VAL ELSE '*********' END", | ||
"comment": "Masks email addresses", | ||
"exempt_other_policies": false, | ||
"owner": "SYSADMIN" | ||
} |
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,9 +1,22 @@ | ||
import pytest | ||
|
||
from titan.operations.export import export_resources | ||
from titan.identifiers import URN, parse_FQN | ||
from titan.operations.export import export_resources, _format_resource_config | ||
from titan.enums import ResourceType | ||
from titan.data_provider import fetch_resource | ||
|
||
pytestmark = pytest.mark.requires_snowflake | ||
|
||
|
||
def test_export_all(cursor): | ||
assert export_resources(session=cursor.connection) | ||
|
||
|
||
def test_export_schema(cursor): | ||
urn = URN(ResourceType.SCHEMA, parse_FQN("STATIC_DATABASE.STATIC_SCHEMA", is_db_scoped=True)) | ||
resource = fetch_resource(cursor, urn) | ||
assert resource | ||
resource_cfg = _format_resource_config(urn, resource, ResourceType.SCHEMA) | ||
assert resource_cfg | ||
assert "database" in resource_cfg | ||
assert resource_cfg["database"] == "STATIC_DATABASE" |
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
Oops, something went wrong.