forked from dyvenia/viadot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dyvenia#892 from dyvenia/dev
Release 0.4.26 PR
- Loading branch information
Showing
14 changed files
with
274 additions
and
144 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
||
### Changed | ||
|
||
### Removed | ||
|
||
|
||
## [0.4.26] - 2024-04-11 | ||
### Added | ||
- Added option for `SAP RFC` connector to get credentials from Azure KeyVault or directly passing dictionary inside flow. | ||
|
||
### Fixed | ||
- Fixed the `if_exists` parameter definition in the `CreateTableFromBlob` task. | ||
- Changed `requirements.txt` to level up version of `dbt-sqlserver` in order to fix bug with `MAXRECURSION` error in dbt_run. | ||
|
||
### Changed | ||
- Changed `dbt-sqlserver` version to `git+https://github.com/djagoda881/[email protected]_option_clause`. | ||
|
||
### Removed | ||
- Removed `dbt-core==1.3.2` from `requirements.txt`. | ||
- Removed copying files to conformed/ and operational/ directories when running `ADLSTOAzureSQL` flow. | ||
|
||
## [0.4.25] - 2024-01-30 | ||
### Added | ||
|
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 |
---|---|---|
|
@@ -39,8 +39,7 @@ aiolimiter==1.0.0 | |
protobuf>=3.19.0, <3.20 | ||
avro-python3==1.10.2 | ||
pygit2>=1.10.1, <1.11.0 | ||
dbt-core==1.3.2 | ||
dbt-sqlserver==1.3.1 | ||
dbt-sqlserver @ git+https://github.com/djagoda881/[email protected]_option_clause | ||
lumaCLI==0.0.19 | ||
Office365-REST-Python-Client==2.4.4 | ||
TM1py==1.11.3 | ||
|
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,13 +1,52 @@ | ||
import pytest | ||
import logging | ||
|
||
from viadot.exceptions import CredentialError | ||
from viadot.config import local_config | ||
from viadot.tasks import SAPRFCToDF | ||
|
||
|
||
def test_sap_rfc_to_df_bbp(): | ||
sap_test_creds = local_config.get("SAP").get("QA") | ||
task = SAPRFCToDF( | ||
credentials=sap_test_creds, | ||
query="SELECT MATNR, MATKL, MTART, LAEDA FROM MARA WHERE LAEDA LIKE '2022%'", | ||
query="SELECT MATNR, MATKL, MTART, LAEDA FROM MARA WHERE LAEDA LIKE '20220110%'", | ||
func="BBP_RFC_READ_TABLE", | ||
) | ||
df = task.run() | ||
df = task.run(sap_credentials_key="SAP", env="QA") | ||
assert len(df.columns) == 4 and not df.empty | ||
|
||
|
||
def test_sap_rfc_to_df_wrong_sap_credential_key_bbp(caplog): | ||
task = SAPRFCToDF( | ||
query="SELECT MATNR, MATKL, MTART, LAEDA FROM MARA WHERE LAEDA LIKE '20220110%'", | ||
func="BBP_RFC_READ_TABLE", | ||
) | ||
with pytest.raises( | ||
CredentialError, | ||
match="sap_credentials_key: SAP_test is not stored neither in KeyVault or local config!", | ||
): | ||
task.run( | ||
sap_credentials_key="SAP_test", | ||
) | ||
assert ( | ||
f"Getting credentials from Azure Key Vault was not possible. Either there is no key: SAP_test or env: DEV or there is not Key Vault in your environment." | ||
in caplog.text | ||
) | ||
|
||
|
||
def test_sap_rfc_to_df_wrong_env_bbp(caplog): | ||
task = SAPRFCToDF( | ||
query="SELECT MATNR, MATKL, MTART, LAEDA FROM MARA WHERE LAEDA LIKE '20220110%'", | ||
func="BBP_RFC_READ_TABLE", | ||
) | ||
with pytest.raises( | ||
CredentialError, | ||
match="Missing PROD_test credentials!", | ||
): | ||
task.run( | ||
sap_credentials_key="SAP", | ||
env="PROD_test", | ||
) | ||
assert ( | ||
f"Getting credentials from Azure Key Vault was not possible. Either there is no key: SAP or env: PROD_test or there is not Key Vault in your environment." | ||
in caplog.text | ||
) |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
def test_version(): | ||
assert __version__ == "0.4.25" | ||
assert __version__ == "0.4.26" |
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 +1 @@ | ||
__version__ = "0.4.25" | ||
__version__ = "0.4.26" |
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.