Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
rickd101973
Contributor
Contributor

Geo Analytics Travel Area

Hello,

 

I have more than 5000 data points in my travel area and getting the following error.

Connector reply error: QVX_SYNTAX_ERROR: Route request failed with error: 500, Requested array size exceeds VM limit

I know you can split the code into chunks but cannot get it to work with Travel Areas.

Here is my current script 

/* Generated by GeoAnalytics for operation TravelAreas ---------------------- */
[_inlineMap_]:
mapping LOAD * inline [
_char_, _utf_
"'", '\u0027'
'"', '\u0022'
"[", '\u005b'
"/", '\u002f'
"*", '\u002a'
";", '\u003b'
"}", '\u007d'
"{", '\u007b'
"`", '\u0060'
"´", '\u00b4'
" ", '\u0009'
];

IF FieldNumber('LookUpZipCode', 'GeoAreaLookup') = 0 THEN
call InvalidInlineData('The field LookUpZipCode in GeoAreaLookup is not available');
END IF
IF FieldNumber('LookUpLatitude', 'GeoAreaLookup') = 0 THEN
call InvalidInlineData('The field LookUpLatitude in GeoAreaLookup is not available');
END IF
IF FieldNumber('LookUpLongitude', 'GeoAreaLookup') = 0 THEN
call InvalidInlineData('The field LookUpLongitude in GeoAreaLookup is not available');
END IF
Let [dataset4InlineTable] = 'LookUpZipCode' & Chr(9) & 'LookUpLatitude' & Chr(9) & 'LookUpLongitude';
Let numRows = NoOfRows('GeoAreaLookup');
Let chunkSize = 1000;
Let chunks = numRows/chunkSize;
For n = 0 to chunks
Let chunkText = '';
Let chunk = n*chunkSize;
For i = 0 To chunkSize-1
Let row = '';
Let rowNr = chunk+i;
Exit for when rowNr >= numRows;
For Each f In 'LookUpZipCode', 'LookUpLatitude', 'LookUpLongitude'
row = row & Chr(9) & MapSubString('_inlineMap_', Peek('$(f)', $(rowNr), 'GeoAreaLookup'));
Next
chunkText = chunkText & Chr(10) & Mid('$(row)', 2);
Next
[dataset4InlineTable] = [dataset4InlineTable] & chunkText;
Next
chunkText=''


[TravelAreas]:
SQL SELECT [LookUpZipCode], [dataset4_TravelArea], [dataset4_Origin], [dataset4_Cost], [dataset4_CostUnit], [dataset4_Status] FROM TravelAreas(costValue='10', costField='', costUnit='Minutes', transportation='car', dataset='dataset4')
DATASOURCE dataset4 INLINE tableName='GeoAreaLookup', tableFields='LookUpZipCode,LookUpLatitude,LookUpLongitude', geometryType='POINTLATLON', loadDistinct='NO', suffix='', crs='Auto' {$(dataset4InlineTable)}
SELECT [LookUpZipCode], [dataset4_Geometry] FROM dataset4;
[dataset4]:
SQL LOAD * FROM dataset4;
tag field [LookUpZipCode] with '$primarykey';
tag field [dataset4_TravelArea] with '$geopolygon';
tag field [LookUpZipCode] with '$geoname';
tag field [dataset4_TravelArea] with '$relates_LookUpZipCode';
tag field [LookUpZipCode] with '$relates_dataset4_TravelArea';
tag field [LookUpZipCode] with '$primarykey';
tag field [dataset4_Geometry] with '$geopoint';
tag field [LookUpZipCode] with '$geoname';
tag field [dataset4_Geometry] with '$relates_LookUpZipCode';
tag field [LookUpZipCode] with '$relates_dataset4_Geometry';

[dataset4InlineTable] = '';

/* End GeoAnalytics operation TravelAreas ----------------------------------- */

Labels (1)
1 Solution

Accepted Solutions
Patric_Nordstrom
Employee
Employee

1 Reply
Patric_Nordstrom
Employee
Employee

Splitting works also for travelareas, please follow the guide:

https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/Splitting-up-GeoAnalytics-connector-operat...

 

Thanks,

Patric