Problem
Given a Feature Layer of portal / item id `feature-layer-id` and a Table of portal/ item id `table-id` where:
- Both portal items have a field `CON_ID`.
- Both portal items are not owned or editable by me directly.
- There would be a left join; Feature -> Table.
- `CON_ID` is Unique on the Table.
- The table will be updated daily.
- The table has approximately 100,000 rows.
- The Feature Layer has approximately 2,300,000 rows.
- The polygons are very small however, being mostly rectangles for building footprints, for example.
The overall project will be done using ReactJS / Vite.js, but this doesn't or shouldn't fully matter at the moment since it could very easily be using vanilla javascript.
Potential Solutions
I do have a few methods of attack I can take. I am able to create a client side feature graphics, querying from the table in batches until I get the feature layer I want, but that seems horribly inefficient and wrong. I don't yet have experience making web workers, which would alleviate user frustrations with their browser crashing, but would have to look into implementing that if this is literally the only way of doing this.
I could create a script to generate a GeoJSON file (and place it at a URL) pretty easily, but I feel like that's quite a bit more work for something that is probably already built in.
I could also create a new layer from joining both of these items via the analysis / join features function, but that will cost quite a few credits and I don't think is good idea for the long term, especially if more columns get added while I'm no longer working on this project.
Questions
I am posting because I genuinely think I'm missing a tool or a feature that makes this much easier, more efficient, or more intuitive / cleaner / scalable. Ideally, I'd like to use the dynamicDataSource property from the Feature Layer group, https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource , but I don't have a workspace id that I can see that I can work with nor do I see a way to add the table data in naturally.
- What is the standard method to use when adding non-joined data onto the map that will be joined by a key field?
- Is it worth using Relates in this here instead of attempting to join? I don't personally feel so, but I am very much open to the idea.
- If so, please link documentation or to a tutorial so I can experiment a little bit. I am not currently sure how to set up Relates using the ArcGIS Online interfaces yet, if it is the proper method of handling data like this.
I can clarify my questions if they do not make sense and I might have follow up questions depending on the answers I receive.
Thank you for your time.