← Back to team overview

dhis2-users team mailing list archive

Re: Issue with gml file map data import

 

Hi James,

this issue is a bit awkward. Many places we need a short (e.g. 50 char
long) org unit name to fit in reports, charts. Now on import from external
sources this might now be available. Previously the org unit shortname
field was unique so we could not simply cut off the name at the 50th char.
Now it is no longer unique so that could be an option.

As an immediate workaround you can set the max-length of shortname to 50
directly in the database. After the import you can deal with this manually
with SQL, e.g. using the psql substring feature to use only the 50 first
chars, or whatever you prefer.

http://www.postgresql.org/docs/9.1/static/functions-string.html

regards,

Lars

On Sat, Mar 2, 2013 at 12:21 PM, ChangJames <jamesbjchang@xxxxxxxxxxx>wrote:

>   Hi,
>
> During my map data import (via gml file), I have encountered an issues.
>
> If name length in gml file is longer than 50 character, the import process
> would throw an error.
>
> This is not the intended behavior, right?
>
> _______________________________________________
> 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
>
>

Follow ups

References