You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -46,7 +46,7 @@ Upload the JSON source data into the source layer.
46
46
47
47
You can review the JSON structure and the data in the file you just uploaded in Graph Studio. It will show you a tree structure of your JSON file, data types, and sample values.
The **ODBC (SQL)** endpoint listed on this page can be used to access the endpoint. You should now be able to open this endpoint in a browser and see the OData response.
4. To see the contract of the endpoint, use the endpoint URL displayed in the endpoint configuration page under **ODBC (SQL)** and append `/$metadata` to this URL. You will need it when using the endpoint in Studio Pro.
129
129
130
130
#### Using the OData Endpoint in a Mendix Project
131
131
132
132
Add a [consumed OData service](/refguide/consumed-odata-service/) in your project by opening Studio Pro and right-clicking your module > **Add other** > **Consumed OData service**. In the **Add Consumed OData Service** dialog, provide the location of the endpoint `$metadata` contract, as well as your username and password credentials. Studio Pro will read the contract to determine all the entities and actions provided by this endpoint.
In the consumed OData service document, you can provide configuration for the endpoint location and credentials. The **Location** is the root endpoint URL you copied from Graph Studio (without the `$metadata` suffix).
#### Creating External Entities for Datasets from the OData Endpoint
141
141
142
142
The [Integration pane](/refguide/integration-pane/) in the right column displays all the graph classes exposed via the OData REST API. You can see the attributes (properties) of these classes and the associations. The Integration pane also shows the capabilities of the data provided by the endpoint. In this example, all the data is read-only, as the Altair Graph Database only provides read-only access to the data.
143
143
144
144
Select which classes you need for your application and drag and drop them into a domain model. Here, they will be displayed as purple external entities. This indicates that the data is available to your application but is retrieved from an external service (in this case, the Altair Graph Database).
You can use these external entities in your pages and microflows similarly to persistent entities. For this example, create your overview pages by right-clicking the entity and selecting **Generate overview pages**.
You can now start the application and test the results. Whenever you open a page using external entities from the Integration pane, the data will automatically be retrieved from Altair Graph Studio via an OData REST call.
Filtering, sorting, and pagination are automatically done server-side by your graph database. This is essential for large datasets to avoid overloading the front-end with too many objects.
161
161
162
162
#### Lazy-Loaded Tree Widget
163
163
164
164
Altair Graph Studio automatically provides associations for linked entities in your graph. These graph associations are part of the OData endpoint and part of your external entities. When you drag your OData datasets into your domain model, the resulting external entities will show associations from the OData endpoint.
This example page shows a tree that retrieves BOMs from the graph database. It will only load required data: first, the top-level BOMs, then, when you open one, its components will be retrieved over the association. Only when you open a component will it load the subcomponents.
169
169
170
170
This is done automatically when you set the external entities as the data source for the widgets in your tree.
3. Run the API call and validate the resulting response message. The **Response** table will show the response JSON payload provided by your graph database.
Create a page that will show the retrieved data. This example uses a [Data Grid 2](/appstore/modules/data-grid-2/) with a microflow data source. The microflow data source is configured to use the microflow that was created in the previous step.
You can now run your application to validate the result. It should have a data grid showing all objects and a detail form showing the details of one specific object, as seen below:
0 commit comments