-
Notifications
You must be signed in to change notification settings - Fork 53
Data Loader
- Log in to healthsites.io with your account. (You must be a
staff
to load the data). - Open
Data Loader
in menu bar. - Fill the form:
- Organisation name: the name of your organisation.
- JSON Concept mapping: A json file that contains json mapping for your data.
- CSV data: The localities data in csv (comma separated value) format. Currently we only accept
comma
as separator. It must be less than 10MB. - Data loader mode: Define the data loader's behaviour. See the difference for both mode in Data Loader section.
- Click
Submit
button.
If you successfully upload your data, you will get success message. The data has not been loaded to the site yet. The site will load the data in the background. It will send email to mark.herringer@gmail.com
and ismail@kartoza.com
. We use these email address since currently the user doesn't have email field. We will send the email to the user who load the data after we add email field in user's attribute.
There are two data loader mode:
If we use this mode, the old data which has the same id will be overwritten by the new data whose the same id. For example:
```python
# Old data
id = '1234',
name = 'Hospital',
address = 'Swellendam, South Africa'
phone_number = '1234567'
```
```python
# new data to be loaded
id = '1234',
name = 'Drugstore',
address = 'Swellendam, South Africa'
owner = 'SA Government'
```
```python
# Data after loading
id = '1234',
name = 'Drugstore',
address = 'Swellendam, South Africa'
owner = 'SA Government'
```
The phone number field is removed in this mode.
If replace data will overwrite the old data, update data will preserve the old data that doesn't have value in the loaded data. For example:
```python
# Old data
id = '1234',
name = 'Hospital',
address = 'Swellendam, South Africa'
phone_number = '1234567'
```
```python
# new data to be loaded
id = '1234',
name = 'Drugstore',
address = 'Swellendam, South Africa'
owner = 'SA Government'
```
```python
# Data after loading
id = '1234',
name = 'Drugstore',
address = 'Swellendam, South Africa'
owner = 'SA Government'
phone_number = '1234567'
```
The phone number field is preserved in this mode.