Skip to content

Commit

Permalink
Changed parameter from credentials to sap_credentials for SAPRFCT…
Browse files Browse the repository at this point in the history
…oADLS
  • Loading branch information
Rafalz13 committed Apr 11, 2024
1 parent 1937ebb commit d4a800d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/integration/flows/test_sap_rfc_to_adls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_sap_rfc_to_adls_query():
name="test flow",
query="SELECT MATNR, MATKL FROM MARA WHERE LAEDA LIKE '2022%' LIMIT 5",
func="BBP_RFC_READ_TABLE",
credentials=SAP_TEST_CREDS,
sap_credentials=SAP_TEST_CREDS,
local_file_path=FILE_NAME,
adls_path=ADLS_PATH,
overwrite=True,
Expand All @@ -37,7 +37,7 @@ def test_sap_rfc_to_adls_validation_fail():
name="test flow",
query="SELECT MATNR, MATKL FROM MARA WHERE LAEDA LIKE '2022%' LIMIT 5",
func="BBP_RFC_READ_TABLE",
credentials=SAP_TEST_CREDS,
sap_credentials=SAP_TEST_CREDS,
local_file_path=FILE_NAME,
adls_path=ADLS_PATH,
overwrite=True,
Expand All @@ -54,7 +54,7 @@ def test_sap_rfc_to_adls_validation_success():
name="test flow",
query="SELECT MATNR, MATKL FROM MARA WHERE LAEDA LIKE '2022%' LIMIT 5",
func="BBP_RFC_READ_TABLE",
credentials=SAP_TEST_CREDS,
sap_credentials=SAP_TEST_CREDS,
local_file_path=FILE_NAME,
adls_path=ADLS_PATH,
overwrite=True,
Expand Down
8 changes: 4 additions & 4 deletions viadot/flows/sap_rfc_to_adls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(
func: str = "RFC_READ_TABLE",
rfc_total_col_width_character_limit: int = 400,
rfc_unique_id: List[str] = None,
credentials: dict = None,
sap_credentials: dict = None,
sap_credentials_key: str = "SAP",
env: str = "DEV",
output_file_extension: str = ".parquet",
Expand Down Expand Up @@ -68,7 +68,7 @@ def __init__(
rfc_unique_id=["VBELN", "LPRIO"],
...
)
credentials (dict, optional): The credentials to use to authenticate with SAP. Defaults to None.
sap_credentials (dict, optional): The credentials to use to authenticate with SAP. Defaults to None.
sap_credentials_key (str, optional): The key for sap credentials located in the local config or Azure Key Vault. Defaults to "SAP".
env (str, optional): The key for sap_credentials_key pointing to the SAP environment. Defaults to "DEV"
output_file_extension (str, optional): Output file extension - to allow selection of .csv for data which is not easy to handle with parquet. Defaults to ".parquet".
Expand All @@ -94,7 +94,7 @@ def __init__(
self.func = func
self.rfc_total_col_width_character_limit = rfc_total_col_width_character_limit
self.rfc_unique_id = rfc_unique_id
self.credentials = credentials
self.sap_credentials = sap_credentials
self.sap_credentials_key = sap_credentials_key
self.env = env
self.output_file_extension = output_file_extension
Expand Down Expand Up @@ -126,7 +126,7 @@ def gen_flow(self) -> Flow:
rfc_total_col_width_character_limit=self.rfc_total_col_width_character_limit,
rfc_unique_id=self.rfc_unique_id,
alternative_version=self.alternative_version,
credentials=self.credentials,
credentials=self.sap_credentials,
sap_credentials_key=self.sap_credentials_key,
env=self.env,
flow=self,
Expand Down

0 comments on commit d4a800d

Please sign in to comment.