Requirement: I want/need to do this using hosted feature services in ArcGIS Online
I'm just trying to do something like this with just one REST API call:
SELECT table1.*
FROM table1, table2
WHERE table1.primary_key = table2.foreign_key
AND table1.attr = 'Value1'
AND table2.attr = 'Value2'
Now I'm going to explain the approach I have been following and the issue I'm facing, but maybe the approach is wrong.
Steps:
Then I tried to do a similar query to this one using the query related records end point from the REST API but I couldn't:
So, I'm not sure if the only way to solve this is programmatically by:
Is this the way to solve what I'm trying to achieve or there's some way to do it with just one API request?.
Best regards,
Raul
BTW: I also tried doing a JOIN in memory and then selecting features by attributes and it worked in ArcGIS Pro, but I couldn't publish that on ArcGIS Online
Solved! Go to Solution.
It can be solved by creating a Hosted Feature Layer View using the Join feature tool in Online.
BTW: this analysis tool takes no credits for analysis and storage when creating a Hosted View.
This way you create a hosted feature layer view that joins the two tables together and returns a new hosted layer (a new item). Things to bear in mind:
Note: in order to create a hosted layer view you do need to own both tables.
Thanks to Jeremy Bartley for your help!,
Raúl
I'm sorry for the inconvenience... but would you know if what I'm trying to do is possible? ^_^ // cc: Rene Rubalcava, Ionut Alixandroae, Patrick Arlt, Dave Bouwman, Tom Wayson, Gavin Rehkemper
Thanks in advance one more time
It can be solved by creating a Hosted Feature Layer View using the Join feature tool in Online.
BTW: this analysis tool takes no credits for analysis and storage when creating a Hosted View.
This way you create a hosted feature layer view that joins the two tables together and returns a new hosted layer (a new item). Things to bear in mind:
Note: in order to create a hosted layer view you do need to own both tables.
Thanks to Jeremy Bartley for your help!,
Raúl