Problem with XML data import

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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement
Data element not found or not acccessible

···

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Correction: This was actually a CSV import, because the XML import gave me the following message:

“Process failed: java.io.IOException: Maximum column length of 100,000 exceeded in column 0 in record 0. Set the SafetySwitch property to false if you’re expecting column lengths greater than 100,000 characters to avoid this error.”

···

On Wed, Feb 25, 2015 at 11:03 AM, Knut Staring knutst@gmail.com 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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Data element not found or not acccessible–

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

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@gmail.com 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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Data element not found or not acccessible–


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

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.

···

On Wed, Feb 25, 2015 at 5:33 AM, Knut Staring knutst@gmail.com 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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Data element not found or not acccessible–


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

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@yahoo.com 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@lists.launchpad.net

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@gmail.com 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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Data element not found or not acccessible–


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

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.

···

On Wed, Feb 25, 2015 at 12:40 PM, deemoyes@yahoo.com 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@lists.launchpad.net

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@gmail.com 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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Data element not found or not acccessible–


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

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@yahoo.com 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@lists.launchpad.net

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@yahoo.com 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@lists.launchpad.net

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


Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

On Wed, Feb 25, 2015 at 5:33 AM, Knut Staring knutst@gmail.com 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 summary

Import count

Type
Count
Imported
453814
Updated
0
Ignored
38209

Conflicts

Element
Description
dataelement

Knut Staring

Dept. of Informatics, University of Oslo

Norway: +4791880522

Skype: knutstar

http://dhis2.org

Data element not found or not acccessible–


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hi,

what DHIS version is this? In 2.17 and later we display the identifiers of
data elements (and other objects) which are not found.

Lars