← Back to team overview

dhis2-users team mailing list archive

Re: Import of Organisation Units using CSV / working example with Features Type and Coordinates?

 

Afternoon all,

I had the same error/issue this morning following the documented column
format for organisation unit CSV import using 2.26. When I removed one of
the 'blank' columns before the URL column (e.g. comments), the import
worked successfully (including the GIS coordinates). This suggests that one
of the documented columns is no longer expected as part of the csv import
function for 2.26.

Cheers,


David

On 13 February 2017 at 07:36, Ant Snyman <ant@xxxxxxxx> wrote:

> Hi Stephen,
>
> The one thing that caught my attention was that another column "Closed
> Date" should come after "Opening Date". Since you do not have an extra ","
> after 1970-01-01, the subsequent columns might be misaligned with the
> coordinates actually trying to import into the url column.
>
> The GIS experts out there might comment on the format of the co-ordinates,
> but I would expect it to be in the format "[7.495005,9.074908]"
>
> Good luck
>
> Regards
>
> Ant
>
>
>
>
>
>
> On 13 February 2017 at 06:07, Stephen Macauley <Stephen.Macauley@
> inductivehealth.com> wrote:
>
>> Greetings All,
>>
>>
>>
>> Does anyone have a working example, *that includes Features Type and
>> Coordinates,* for the import of Organisation Units using CSV for 2.2.5
>> (currently using Build Revision 8dd81e6)?
>>
>>
>>
>> I have tried numerous approaches using the available documentation, but
>> always encounter a challenge when the import files contains Features Type
>> and Coordinates (as defined here https://docs.dhis2.org/2.25/en
>> /developer/html/webapi_csv_metadata_import.html#webapi_csv_org_units).
>>
>>
>>
>>
>>
>> *Sample excerpt from my import file:*
>>
>>
>>
>> Name,UID,Code,Parent UID,Short name,Description,UUID,Opening
>> date,Comment,Feature type,Coordinates,URL,Contact
>> person,Address,Email,Phone number
>>
>> Bacta One,thzLERyqmDe,thzLERyqmDe,YtReWq54321,Bacta One,Bacta
>> One,,1970-01-01,test,Point,"7.495005,9.074908",,,,,
>>
>> Bacta Two,ms1BoduOt0I,ms1BoduOt0I,YtReWq54321,Bacta Two,Bacta
>> Two,,1970-01-01,test,Point,"7.476555,9.04081",,,,,
>>
>>
>>
>> I have tried various combinations of the Feature Type (Point, POINT,
>> POLYGON, leaving it blank) and have also tried putting the Coordinates in
>> brackets ([7.495005,9.074908]).
>>
>>
>>
>> A common response I get back during dry run is the below, which makes me
>> believe I have fields out of position or something else is happening with
>> the Feature type field based on a few different “enum” exceptions in the
>> dhis.log file.
>>
>>
>>
>> OrganisationUnit
>>
>> String
>>
>> Property `url` requires a valid URL, was given `7.02149,4.76539`.
>>
>>
>>
>>
>>
>> Many Thanks in Advance,
>>
>>
>>
>> -Stephen
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> *Ant Snyman*
>
> *Cell: 0824910449*
>
> *Landline: 028 2713242*
>
>
> Health Information Systems Program - SA
>
> *This message and any attachments are subject to a disclaimer published at
> http://www.hisp.org/policies.html#comms_disclaimer
> <http://www.hisp.org/policies.html#comms_disclaimer>.  Please read the
> disclaimer before opening any attachment or taking any other action in
> terms of this electronic transmission.  If you cannot access the
> disclaimer, kindly send an email to disclaimer@xxxxxxxx
> <disclaimer@xxxxxxxx> and a copy will be provided to you. By replying to
> this e-mail or opening any attachment you agree to be bound by the
> provisions of the disclaimer.*
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

References