Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
OlivierS
Partner - Contributor III
Partner - Contributor III

GEOOP 401 ERROR on Qlik Saas

Hi,

I have the same error using the Qlik GeoAnalytic Connector for Interset and Within query.

I tried these function with very simple table to be sure of the syntax, i got you some screencap:

WithinError2.jpgWithinError3.jpg

 

 

Here is the scriptrequest:

[WithinResultTable]:
Load * Extension GeoOperations.ScriptEval('
Within()
DATASOURCE City INTABLE keyField="City_ID", crs="auto", pointField="City_LocationPoint"
DATASOURCE Country INTABLE keyField="Country_ID", crs="auto", polygonField="Country.Country_Name_GeoInfo"
', City);

 

So i basically trying to make the script work for a City ($Geopoint) Within a Country ($GeoPolygon). I receive this error:

L'erreur suivante s'est produite:
Connector reply error: grpc::StatusCode::INVALID_ARGUMENT: 'GEOOPS-401: Missing column in indata: Country_ID'

Emplacement de l'erreur:
[WithinResultTable]:
Load * Extension GeoOperations.ScriptEval('
Within()
DATASOURCE City INTABLE keyField="City_ID", crs="auto", pointField="City_LocationPoint"
DATASOURCE Country INTABLE keyField="Country_ID", crs="auto", polygonField="Country.Country_Name_GeoInfo"
', City)
Labels (4)
2 Solutions

Accepted Solutions
JeromeS
Partner - Contributor III
Partner - Contributor III

Hey Joost,

 

Querry with two intable doesn't seem to work. I recommend you save one of your dataset externally as a CSV or even better a GeoJson.

View solution in original post

OlivierS
Partner - Contributor III
Partner - Contributor III
Author

Hi Peter,

 

You are making the querry with two tabled previously loaded into the qlik engine (Intable parameters).

 

Most of geoanaylitcs work with a max of one Intable, the other data must be loaded from elsewhere (made it through a Dropbox if I recall)....

 

Best regards,

 

O.

View solution in original post

7 Replies
joostvanegmond7
Partner - Contributor II
Partner - Contributor II

I've got the same problem using the Within function in Qlik SAAS. I think it's a bug because it works in Qlik Sense Eneterprise Geo Analytics

joostvanegmond7_0-1677585704691.png

 

JeromeS
Partner - Contributor III
Partner - Contributor III

Hey Joost,

 

Querry with two intable doesn't seem to work. I recommend you save one of your dataset externally as a CSV or even better a GeoJson.

joostvanegmond7
Partner - Contributor II
Partner - Contributor II

Hi Jerome, 

Thanks for your reply. I think you're right, hopefully the functionality of using two loaded tables will be in a new release of Qlik SAAS shortly. 

peterstalberg
Contributor III
Contributor III

202-01-18: I'm experiencing the same issue, moving an app from QlikSense (which worked 100% perfect with the GeoAnalytics connector "within") to SaaS and using GeoOperations instead. Identical data in both applications.

Are loaded tables the problem?

Error
peterstalberg_0-1705572798985.png

GeoAnalytics script (ok)

LIB CONNECT TO 'GA';
 
/* Generated by GeoAnalytics for operation Within ---------------------- */
[_inlineMap_]:
mapping LOAD * inline [
_char_, _utf_
"'", '\u0027'
'"', '\u0022'
"[", '\u005b'
"/", '\u002f'
"*", '\u002a'
";", '\u003b'
"}", '\u007d'
"{", '\u007b'
"`", '\u0060'
"´", '\u00b4'
" ", '\u0009'
];
 
IF FieldNumber('V_ID', 'VESSEL_AIS_POS') = 0 THEN
call InvalidInlineData('The field V_ID in VESSEL_AIS_POS is not available');
END IF
IF FieldNumber('Latitude', 'VESSEL_AIS_POS') = 0 THEN
call InvalidInlineData('The field Latitude in VESSEL_AIS_POS is not available');
END IF
IF FieldNumber('Longitude', 'VESSEL_AIS_POS') = 0 THEN
call InvalidInlineData('The field Longitude in VESSEL_AIS_POS is not available');
END IF
Let [EnclosedInlineTable] = 'V_ID' & Chr(9) & 'Latitude' & Chr(9) & 'Longitude';
Let numRows = NoOfRows('VESSEL_AIS_POS');
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 'V_ID', 'Latitude', 'Longitude'
row = row & Chr(9) & MapSubString('_inlineMap_', Peek('$(f)', $(rowNr), 'VESSEL_AIS_POS'));
Next
chunkText = chunkText & Chr(10) & Mid('$(row)', 2);
Next
[EnclosedInlineTable] = [EnclosedInlineTable] & chunkText;
Next
chunkText=''
[_inlineMap_]:
mapping LOAD * inline [
_char_, _utf_
"'", '\u0027'
'"', '\u0022'
"[", '\u005b'
"/", '\u002f'
"*", '\u002a'
";", '\u003b'
"}", '\u007d'
"{", '\u007b'
"`", '\u0060'
"´", '\u00b4'
" ", '\u0009'
];
 
IF FieldNumber('ICE_AREAS.Name', 'ICE_AREAS') = 0 THEN
call InvalidInlineData('The field ICE_AREAS.Name in ICE_AREAS is not available');
END IF
IF FieldNumber('ICE_AREAS.Area', 'ICE_AREAS') = 0 THEN
call InvalidInlineData('The field ICE_AREAS.Area in ICE_AREAS is not available');
END IF
Let [EnclosingInlineTable] = 'ICE_AREAS.Name' & Chr(9) & 'ICE_AREAS.Area';
Let numRows = NoOfRows('ICE_AREAS');
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 'ICE_AREAS.Name', 'ICE_AREAS.Area'
row = row & Chr(9) & MapSubString('_inlineMap_', Peek('$(f)', $(rowNr), 'ICE_AREAS'));
Next
chunkText = chunkText & Chr(10) & Mid('$(row)', 2);
Next
[EnclosingInlineTable] = [EnclosingInlineTable] & chunkText;
Next
chunkText=''
 
 
[WITHIN_ICE_AREA]:
SQL SELECT [Enclosed_Enclosing_RelationId], [V_ID], [ICE_AREAS.Name] FROM Within(enclosed='Enclosed', enclosing='Enclosing')
DATASOURCE Enclosed INLINE tableName='VESSEL_AIS_POS', tableFields='V_ID,Latitude,Longitude', geometryType='POINTLATLON', loadDistinct='NO', suffix='', crs='Auto' {$(EnclosedInlineTable)}
DATASOURCE Enclosing INLINE tableName='ICE_AREAS', tableFields='ICE_AREAS.Name,ICE_AREAS.Area', geometryType='POLYGON', loadDistinct='NO', suffix='', crs='Auto' {$(EnclosingInlineTable)}
SELECT [V_ID], [Enclosed_Geometry] FROM Enclosed
SELECT [ICE_AREAS.Name], [ICE_AREAS.Area] FROM Enclosing;
[Enclosed]:
SQL LOAD * FROM Enclosed;
[Enclosing]:
SQL LOAD * FROM Enclosing;
tag field [Enclosed_Enclosing_RelationId] with '$primarykey';
tag field [V_ID] with '$primarykey';
tag field [Enclosed_Geometry] with '$geopoint';
tag field [V_ID] with '$geoname';
tag field [Enclosed_Geometry] with '$relates_V_ID';
tag field [V_ID] with '$relates_Enclosed_Geometry';
tag field [ICE_AREAS.Name] with '$primarykey';
tag field [ICE_AREAS.Area] with '$geopolygon';
tag field [ICE_AREAS.Name] with '$geoname';
tag field [ICE_AREAS.Area] with '$relates_ICE_AREAS.Name';
tag field [ICE_AREAS.Name] with '$relates_ICE_AREAS.Area';
 
[EnclosedInlineTable] = '';
[EnclosingInlineTable] = '';
 
/* End GeoAnalytics operation Within ----------------------------------- */


GeoOperation script (error)
[WithinResultTable]:
Load * Extension GeoOperations.ScriptEval('
SELECT enclosed_enclosing_RelationId, V_ID, ICE_AREAS.Name, enclosing.ICE_AREAS.Area, enclosed.Position FROM
Within()
DATASOURCE enclosed INTABLE keyField="V_ID", crs="auto", pointField="Position"
DATASOURCE enclosing INTABLE keyField="ICE_AREAS.Name", crs="auto", polygonField="ICE_AREAS.Area"
', VESSEL_AIS_POS);

 

 

OlivierS
Partner - Contributor III
Partner - Contributor III
Author

Hi Peter,

 

You are making the querry with two tabled previously loaded into the qlik engine (Intable parameters).

 

Most of geoanaylitcs work with a max of one Intable, the other data must be loaded from elsewhere (made it through a Dropbox if I recall)....

 

Best regards,

 

O.

peterstalberg
Contributor III
Contributor III

Hi Oliver,

Thank you for your response. This was not clear to me.

So, what is best practice here? My point-data file is residing on SaaS  as a QVD - changing daily whilst my polygon KML file is static. The file contains a few named polygons. Do you think it is it possible to convert the KML file to a usable format and place same in a catalogue on SaaS rather to have it somewhere externally (e.g. Dropbox)?

LOAD
ICE_AREAS.Name,
ICE_AREAS.Area,
FROM [lib://Static content:DataFiles/ICE_AREAS.KML]

 

 

OlivierS
Partner - Contributor III
Partner - Contributor III
Author

Don't worry, it is not clear for anyone seeing this specific point isn't detailled in the documentation and can only be founded in specific post in the forum 😉

I didn't try to work with the kml file, maybe you can try it's relative cloud address and use that address inside the geoanalytics connect parameters.