Qlik Community

Qlik GeoAnalytics Discussions

Discussion Board for collaboration regarding Qlik GeoAnalytics.

jakob_rasmussen
New Contributor III

GeoAnalytics Connector: Correct syntax for Location ID Suffix

I'm playing around with the different GeoAnalytics Connector options and am having some difficulties understanding how to apply the correct syntax for Location ID Suffix. See below example:

CityData:

Load RecNo() as ID, * Inline [

City, State, Country

Berlin, , Germany

Copenhagen, , Denmark

Los Angeles, CA, USA

Denver, CO, USA

Holte, , Denmark

];

Using the GA Load connector to recognize data I would use the following settings:

GA_Load_screenshot.png

The result will be a table with data like this:

GA_Load_result.png

The first 4 lines are correct, but notice how the Danish city of Holte has been recognized as a city in the Netherlands.

I've been trying to play around with the Location ID Suffix to force it to recognize the country field, but with no luck so far. In general I am missing some documentation on the best practice of how to use the suffix in both the connector and in the front-end.

Can anyone advise the best approach for getting this to work?

Jakob

1 Solution

Accepted Solutions
Employee
Employee

Re: GeoAnalytics Connector: Correct syntax for Location ID Suffix

Hi Jakob,

Sorry for being unclear, the wording


Table Fields (key,geometry,...).


is intended to indicate that the first field is used for an index field, the second field (and only that field) is used for the location string.


Any remaining fields are included in the response but not used for lookup. In other operations remaining fields can have a purpose but not in the load operation.

Thanks,

Patric

4 Replies
Employee
Employee

Re: GeoAnalytics Connector: Correct syntax for Location ID Suffix

Hi,

from GeoAnalytics Reference

Location ID SuffixstringFor advanced user. The specified string is appended to all IDs. This is a convenient way to specify more information to server based location services such as country code or type. The alternative is to append the extra data when loading the table into Qlik. With the following suffix all items are specified to be cities in Sweden:

:P*,SE

See Geometry Service Specification for more information on syntax to use.

But in this case (since there are many countries) I would build a new field and then do the load with the new field:

city & ',' & country as location

you can also add the location type to string to increase hit rate, more info on types here:

http://bi.idevio.com/wp-content/qlik/qliksense/releases/IdevioMapsForQlikSense-5.11.1/geometry_servi...

Thanks,

Patric

jakob_rasmussen
New Contributor III

Re: GeoAnalytics Connector: Correct syntax for Location ID Suffix

Hi Patric,

Thanks for the reply. I can make below work and it finds the correct cities (Holte in DK and the two Springfields in the respective US states). What I'm curious about is what the difference is between me creating a [Location] field and how the connector interprets the input in the Table Fields (key,geometry,...).

What's the difference between below two?

a) creating a new location field => Input is ID, Location

b) keeping the existing fields => Input is ID, City, State, Country

CityData:

Load

RecNo() as ID,

    City & ',' & If(State<>'', State & ',') & Country as Location,

    * Inline [

City, State, Country

Berlin,, Germany

Copenhagen,, Denmark

Los Angeles, CA, USA

Denver, CO, USA

Holte,, Denmark

Springfield, FL, USA

Springfield, IL, USA

];

GA_Load_screenshot2.png

Employee
Employee

Re: GeoAnalytics Connector: Correct syntax for Location ID Suffix

Hi Jakob,

Sorry for being unclear, the wording


Table Fields (key,geometry,...).


is intended to indicate that the first field is used for an index field, the second field (and only that field) is used for the location string.


Any remaining fields are included in the response but not used for lookup. In other operations remaining fields can have a purpose but not in the load operation.

Thanks,

Patric

Highlighted
jakob_rasmussen
New Contributor III

Re: GeoAnalytics Connector: Correct syntax for Location ID Suffix

Thanks Patric. Very useful information to have.

I still humbly would like to request a small guide on how to the location ID suffix can be put to use in various cases. The documentation provides a good overview on what options are available and what syntax, but a few more examples will make it easier to get a better understanding.

Best regards,

Jakob