Export data from R2 into SFTP via file transfer
Content was last updated in 06.23.01-00
Revision History
Version No. | Reference No. | Changes |
06.23.01-00 | R2-19915, R2-19916 | Generic Content for SFTP File Upload/ Download process. |
Through this feature, you can extract the latest pricing data from R2 to update records in a 3rd party database.
This can be achieved through a .CSV file uploaded to a Secured FTP location. This CSV file contains all the updated prices.
You can download the same .CSV file and extract it at the client's end to update prices in a 3rd party database.
The pre-requisite for this step are explained here...
The entire process can be summarized in the following 5-step process:
Item's price is changed from within the R2 application.
A scheduler periodically runs 'Item price export script'.
This 'Item price export script' logs the updated items for the last period.
The extracted log is uploaded to a Secure FTP server. Log is saved as .CSV file.
Since the log created has time specific data, the file is named accordingly.
The format followed is R2_<Type>_YYYYMMDD_HH24MISS.csv
If the file is being uploaded for the first time, system creates a folder named 'priceFeed'.
Subsequently all files are uploaded to this folder, as it already exists.
A separate scheduler periodically runs a 'R2 API' handler that updates the product information with latest 'Price Changes'.
If the extraction and update is successful, system logs it in the 'Success' folder
Else, if the extraction and update fails for any reason, system logs it in the 'Failure' folder
Automate the extraction
The python scripts which perform the data extraction can be scheduled to run seamlessly and automatically at a pre-defined schedule.
The output generate gets saved in a designated folder, as configured in the script.