The Hyundai item catalog, provided as a zipped file, must be periodically update/imported into the database schema xtnissan. The import is done by the following steps:
- Unzipping the file
- Converting the text file to a CSV file, compliant with the PostgreSQL bulk load format
- Loading the CSV file into the database by using the stored procedure import_catalog.
The following shell script allows to automate these steps and can be simply called like followed:
/opt/ses/bin/importNissanCatalog.sh -f /tmp/I48_Price_List_S591_D2.D210128.T094514-txt.zip
Hint: The password for the import user can be found in the keypass file.