Extending the SAP Ariba extraction tool
Introduction
The SAP Ariba Purchase-to-Pay and the SAP Ariba Vendor-Sourcing app templates contain an extractor that allows to extract data from SAP Ariba in CSV format using Ariba APIs for the app template specific processes. This page describes how to extend this extractor with a new API configuration if you want to extract data from SAP Ariba for other processes, for example, Supplier management, or Invoice management.
Prerequisites
It is assumed that you have:
- basic knowledge on Python.
- knowledge about the SAP Ariba API.
- downloaded and extracted the
SAP_Ariba_extractor.zipextraction tool from the SAP Ariba Purchase-to-Pay or SAP Ariba Vendor-Sourcing app template documentation.
Adding a new API configuration
Follow these steps to add a new API configuration to the SAP Ariba extraction tool.
- Add the API configuration in the file
extractor/developer_settings.yamlfile of the extraction tool. - Add the corresponding
***_api_key,***_client_id, and***_secretto theuser_settings.yamlfile. - If a new model is needed, add it to the
models/folder of the extraction tool. If needed, add a new table in thetables/folder.noteThe table must have fields that are included in the model.
- In the
extractor/settings.pyfile,- add the newly created model to the existing
_MODELS_MAPPING_variable. - add the newly created table to the existing
_TABLE_MAPPING_variable.
- add the newly created model to the existing
- In case you want to call multiple models with a single call, add a constant in
/utils/constants.pyand extendcli_handler/entrypoint.pyto use the constant to extract all models.