← Back to team overview

dhis2-users team mailing list archive

Re: Import OrgUnits Via CSV file

 

Hi?

Did anybody figure out why I can't insert parentid into Database using csv

Regards
On 26 Jun 2014 17:22, "Felix Obareh" <fobareh@xxxxxxxxxxxxxx> wrote:

> Adebusoye,
>
> I think the CSV structure has been predefined to affect the name, uid,
> code,shortname,
>
> name,uid,code, parentid
> "Ky","","","52"
> "Gt","","","52"
> "Li","","","52"
> "Mo","","","52"
> "Ni","","","52"
> "Pa","","","52"
>
> Irregardless of the what i use as the forth variable the CSV still insert
> into the  shortname column in the database for the parentid instead of the
> ParentID column.
>
> Please advice
>
>
> On Thu, Jun 26, 2014 at 4:38 PM, Adebusoye Anifalaje <busoye@xxxxxxxx>
> wrote:
>
>> Hi Felix,
>>
>> From your CSV, it seems you are using the Parent UID. From my OU imports,
>> it’s most likely you need the ParentID.
>>
>> Let’s know if this helps.
>>
>> Busoye
>>
>> On 26 Jun 2014, at 14:24, Felix Obareh <fobareh@xxxxxxxxxxxxxx> wrote:
>>
>> Lars,
>>
>> I have downloaded 2.15 Build Version 15175 i have the same experience as
>> before;-
>>
>> Below is my sample CSV file:-
>>
>> name,uid,code,parent
>> "ST","","","GM1aIUXHSZF"
>> "UK","","","GM1aIUXHSZF"
>> "LA","","","GM1aIUXHSZF"
>> "MU","","","GM1aIUXHSZF"
>> "NK","","","GM1aIUXHSZF"
>> "PT","","","GM1aIUXHSZF"
>>
>> Please advice
>>
>> Regards
>>
>>
>>
>>
>> On Thu, Jun 26, 2014 at 1:54 PM, Felix Obareh <fobareh@xxxxxxxxxxxxxx>
>> wrote:
>>
>>> Lars,
>>>
>>> Thank you.
>>>
>>> Regards
>>>
>>>
>>> On Thu, Jun 26, 2014 at 1:53 PM, Lars Helge Øverland <
>>> larshelge@xxxxxxxxx> wrote:
>>>
>>>> Hi Felix,
>>>>
>>>> we actually fixed and back-ported this to 2.15 a few weeks ago. Could
>>>> you please upgrade your DHIS instance to the latest 2.15 from
>>>> dhis2.org/downloads?
>>>>
>>>> regards,
>>>>
>>>> Lars
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jun 26, 2014 at 12:51 PM, Felix Obareh <fobareh@xxxxxxxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I man trying import OrgUnits using CSV but it does not seem to pick
>>>>> the parentid,
>>>>>
>>>>> I am using the example below from:-
>>>>>  https://www.dhis2.org/doc/snapshot/en/user/html/ch21.html#d5e3351
>>>>>
>>>>> name,uid,code,parent
>>>>> "West province","","WESTP","ImspTQPwCqd"
>>>>> "East province","","EASTP","ImspTQPwCqd"
>>>>>
>>>>> ==========Result==========
>>>>>
>>>>> The problem is that the name, uid and the code insert correctly on my postgres database but the parent is inserted unto the shortname column
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> That happens even with even my test csv file.
>>>>>
>>>>> Please advice
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Obare Felix
>>>>> Business Systems Director
>>>>> SoftCall Communication |Software Engineering & Development| WHMCS
>>>>> Automation <http://www.softcall.co.ke/>| Bulk SMS
>>>>> <http://www.smartsms.co.ke/>| Shortcodes Systems
>>>>> <http://www.smartsms.co.ke/>|
>>>>>  General Conference Building Riverside Drive off
>>>>> Chiromo Road Nxt to Australian High Commission :Tel
>>>>> 254 20 3520010|Fax: 254 20 4440969  Cell: 254 733 730035 |254 720
>>>>> 730035
>>>>> www.softcall.co.ke | fobareh@xxxxxxxxxxxxxx   Yahoo Chat:
>>>>> felondri@xxxxxxxxx|  Gchat:fobareh@xxxxxxxxxxxxxx| Skype: softcallcom
>>>>> | Twitter: @smartsms_ke
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Obare Felix
>>> Business Systems Director
>>> SoftCall Communication |Software Engineering & Development| WHMCS
>>> Automation <http://www.softcall.co.ke/>| Bulk SMS
>>> <http://www.smartsms.co.ke/>| Shortcodes Systems
>>> <http://www.smartsms.co.ke/>|
>>>  General Conference Building Riverside Drive off
>>> Chiromo Road Nxt to Australian High Commission :Tel
>>> 254 20 3520010|Fax: 254 20 4440969  Cell: 254 733 730035 |254 720 730035
>>> www.softcall.co.ke | fobareh@xxxxxxxxxxxxxx   Yahoo Chat:
>>> felondri@xxxxxxxxx|  Gchat:fobareh@xxxxxxxxxxxxxx| Skype: softcallcom |
>>> Twitter: @smartsms_ke
>>>
>>
>>
>>
>> --
>> Obare Felix
>> Business Systems Director
>> SoftCall Communication |Software Engineering & Development| WHMCS
>> Automation <http://www.softcall.co.ke/>| Bulk SMS
>> <http://www.smartsms.co.ke/>| Shortcodes Systems
>> <http://www.smartsms.co.ke/>|
>>  General Conference Building Riverside Drive off
>> Chiromo Road Nxt to Australian High Commission :Tel
>> 254 20 3520010|Fax: 254 20 4440969  Cell: 254 733 730035 |254 720 730035
>> www.softcall.co.ke | fobareh@xxxxxxxxxxxxxx   Yahoo Chat:
>> felondri@xxxxxxxxx|  Gchat:fobareh@xxxxxxxxxxxxxx| Skype: softcallcom |
>> Twitter: @smartsms_ke
>>  _______________________________________________
>> 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
>>
>>
>>
>
>
> --
> Obare Felix
> Business Systems Director
> SoftCall Communication |Software Engineering & Development| WHMCS
> Automation <http://www.softcall.co.ke>| Bulk SMS
> <http://www.smartsms.co.ke>| Shortcodes Systems
> <http://www.smartsms.co.ke>|
>  General Conference Building Riverside Drive off
> Chiromo Road Nxt to Australian High Commission :Tel
> 254 20 3520010|Fax: 254 20 4440969  Cell: 254 733 730035 |254 720 730035
> www.softcall.co.ke | fobareh@xxxxxxxxxxxxxx   Yahoo Chat:
> felondri@xxxxxxxxx|  Gchat:fobareh@xxxxxxxxxxxxxx| Skype: softcallcom |
> Twitter: @smartsms_ke
>

Follow ups

References