-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5/n][dagster-tableau] Implement FivetranWorkspaceData to FivetranCon…
…nectorTableProps method
- Loading branch information
1 parent
252be0c
commit d5a03b3
Showing
4 changed files
with
95 additions
and
20 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
30 changes: 30 additions & 0 deletions
30
...modules/libraries/dagster-fivetran/dagster_fivetran_tests/experimental/test_translator.py
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,30 @@ | ||
import uuid | ||
from typing import Callable | ||
|
||
from dagster_fivetran import FivetranWorkspace | ||
|
||
|
||
def test_fivetran_workspace_data_to_fivetran_connector_table_props_data( | ||
workspace_data_api_mocks_fn: Callable, | ||
) -> None: | ||
api_key = uuid.uuid4().hex | ||
api_secret = uuid.uuid4().hex | ||
|
||
resource = FivetranWorkspace(api_key=api_key, api_secret=api_secret) | ||
|
||
with workspace_data_api_mocks_fn(include_sync_endpoints=False): | ||
actual_workspace_data = resource.fetch_fivetran_workspace_data() | ||
table_props_data = actual_workspace_data.to_fivetran_connector_table_props_data() | ||
assert len(table_props_data) == 4 | ||
assert ( | ||
table_props_data[0].table == "schema_name_in_destination_1.table_name_in_destination_1" | ||
) | ||
assert ( | ||
table_props_data[1].table == "schema_name_in_destination_1.table_name_in_destination_2" | ||
) | ||
assert ( | ||
table_props_data[2].table == "schema_name_in_destination_2.table_name_in_destination_1" | ||
) | ||
assert ( | ||
table_props_data[3].table == "schema_name_in_destination_2.table_name_in_destination_2" | ||
) |