← Back to team overview

dhis2-users team mailing list archive

Re: Problem with XML data import

 

I am not sure what tools you are using Knut, but the simplest way again, is
to simply check everything on the destination system prior to import.
Collect all your data element UIDs and check them against
/api/dataElements/XXXXX/ on the destination system, to be sure they are
there. This can be done with a simple CURL call. Same for the other
objects(ous, cocs, attribute cocs). Excel may not be the best tool for
this, but it might work.

Obviously, checking for duplicates should also be done, as DHIS2 does not
handle these so elegantly. If there are duplicates in your file, the
"first" value will be picked, which may result in unexpected results.

Regards,
Jason


On Wed, Feb 25, 2015 at 7:21 AM, <deemoyes@xxxxxxxxx> wrote:

> Good. If it was exported from an existing instance, then the UIDs and data
> element names must be checked to see that they tally.
>
> As Jason correctly stated, you can show the full page of your data
> elements through the API on the new instance and then save it as xml after
> which you open it up using excel and then compare the UIDs with that on the
> CSV file you are trying import.
>
> This will help.
>
> Regards,
>
> Adedayo
>
>
> Sent from my BlackBerry 10 smartphone.
>   *From: *Knut Staring
> *Sent: *Wednesday, 25 February 2015 07:12
> *To: *Dayo Adeyomoye
> *Cc: *Jason Pickering; dhis2-users@xxxxxxxxxxxxxxxxxxx
> *Subject: *Re: [Dhis2-users] Problem with XML data import
>
> Thanks, this was actually a CSV import, as XML does not work at all.
> Exported from an existing instance of DHIS2.
>
> On Wed, Feb 25, 2015 at 12:40 PM, <deemoyes@xxxxxxxxx> wrote:
>
>> That's completely true. You can also do a CSV import instead, where it
>> will be easier for you to see the data elements, their UIDS and what have
>> you rather than the xml where you can have several typos kind of.
>>
>> Also, was this data that you are trying to import into your instance
>> exported from another instance or 3 party-application?
>>
>> Regards,
>> Adedayo
>> Sent from my BlackBerry 10 smartphone.
>>   *From: *Jason Pickering
>> *Sent: *Wednesday, 25 February 2015 06:08
>> *To: *Knut Staring
>> *Cc: *dhis2-users@xxxxxxxxxxxxxxxxxxx
>> *Subject: *Re: [Dhis2-users] Problem with XML data import
>>
>> It can be hard to tell.We need much better information here as the log
>> reports are pretty useless.
>>
>> You should probably gather all of your data element ids and check them
>> one by one against whether they are available before attempting an import.
>> This can be done through the API and scripted of course. Same for orgunits
>> and catcombos.
>>
>> Regards,
>> Jason
>>
>>
>> On Wed, Feb 25, 2015 at 5:33 AM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>
>>> As can be seen from the Import Summary below, I have around 38K values
>>> that don't get imported because the corresponding data element is not found.
>>>
>>> Suggestions as to how I can find out WHICH data element(s) that is not
>>> linking?
>>>
>>> Import summaryImport countTypeCountImported453814Updated0Ignored38209
>>> ConflictsElementDescriptiondataelementData element not found or not
>>> acccessible
>>>
>>> --
>>> Knut Staring
>>> Dept. of Informatics, University of Oslo
>>> Norway: +4791880522
>>> Skype: knutstar
>>> http://dhis2.org
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.pickering@xxxxxxxxx
>> tel:+46764147049
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

Follow ups

References