Skip to content

Commit

Permalink
Update read me
Browse files Browse the repository at this point in the history
  • Loading branch information
Wambere committed Mar 26, 2024
1 parent 166e218 commit 140a895
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion importer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,11 @@ The coverage report `coverage.html` will be at the working directory
- The `value` is where you pass the actual parameter value to filter the resources. The set default value is "gt2023-01-01", other examples include, "Good Health Clinic 1"
- The `limit` is the number of resources exported at a time. The set default value is '1000'
- Specify the `resource_type` you want to export, different resource_types are exported to different csv_files
- The csv_file containing the exported resources is labelled using the current time, to know when the resources were exported for example, csv/exports/2024-02-21-12-21-export_Location.csv
- The csv_file containing the exported resources is labelled using the current time, to know when the resources were exported for example, csv/exports/2024-02-21-12-21-export_Location.csv

### 10. Import products from openSRP 1
- Run `python3 main.py --csv_file csv/import/product.csv --setup products --log_level info`
- See example csv [here](/importer/csv/import/product.csv)
- This creates a Group resource for each product imported
- The first two columns __name__ and __active__ is the minimum required
- The last column __imageSourceUrl__ contains a url to the product image. If this source requires authentication, then you need to provide the `product_access_token` in the config file. The image is added as a binary resource and referenced in the product's Group resource

0 comments on commit 140a895

Please sign in to comment.