How to get data from an index layer
An index layer is an index of the catalog data by attributes. You can query the index layer to get the data handles of data that meets your query criteria, and you can then use these data handles to get the corresponding data.
To get data from the index layer:
- Create the
IndexLayerClientobject. - Call the
getDatamethod with the data model that contains the ID property (also used as the data handle).
Note
You can find the data model in the partition metadata. For instructions, see [Get partition metadata from an index layer] (#get-partition-metadata-from-an-index-layer).
const data = await indexLayerClient.getData(model);You receive data from the requested partition.
In browser and Node.js, to abort requests before they have completed, you can create the AbortController object, and then add the AbortController.signal property to your requests. For more information, see the AbortController documentation.
Example:
const abortController = new AbortController();
const data = await indexLayerClient.getData(model, abortController.signal);Updated 9 days ago