Data Integration
RealityHub allows you to integrate external data sources such as weather, finance, elections, and sports right inside your 3d virtual studio, augmented reality configurations, and mixed reality setup.
RealityHub supports scripting to ingest data from popular database management systems such as MSSQL, MySQL, and PostgreSQL.
We also added XLSX and CSV filetype support which you can store on a local drive, shared folder, or website.
Data Integration Workflow
Every production pipeline has its method and steps to create and publish content, including data integration.
Since there is no monolithic approach to the data integration workflow, the most widespread practice involving Reality Engine/Unreal Engine and RealityHub may have to apply the following steps:
Designing content inside an Engine
Exposing variables/functions to RealityHub
Launching the project via Launcher module or Playing the project in the Editor Mode
Building a Form Template based on the Properties and Functions of the node
Adding the HTTPS/JSON/JS component to Form Template
Defining the data source in the Field Settings
Assigning key names based on incoming data
Checking results via Playout module
Reality External Data
The ExternalData is a component that allows you to integrate your external data directly into the Form Template design. External data integration has the following steps:
Binding Data
Ingesting Data
Ingesting data sources can be done by the following methods:
Downloading data from URL
Executing a JavaScript Function
Download Data From URL
Activate the Form Builder module
Create a New Form
Go to Components > External Data
Drag and drop the ExternalData component to your Template Form
Click on the Field Settings button as shown in the image above
As soon as you click on the Field Settings button, ExternalData Settings window pops up. Now:
Click and activate the Download data from URL checkbox as shown on the image above
Define the source URL of the data you want to ingest into your Template Form.
Consider that your URL provides weather data for every city in your country, but you need only four major cities’ real-time data to be exposed to your design/blueprint. To do that, you have to add proper keywords inside curly braces of your URL. Later on, in response to every keyword, you have to add a user input component inside the ExternalData so keywords and input values can match uniformly.
Put the part in the URL you want to be variable in curly braces.
Example:
http://localhost/examples/city-weather-dyn.json?city={city}&range=2-9
As the example above shows: {city} part in the URL above will be replaced with the information the operator will select or type during the Playout.
Use a backslash (e.g., \{) to escape curly braces.
External Data Components always parse the URL response as JSON.
The URL on the image above is only for illustrative purposes.
Execute a JavaScript Function
Script Editor inside the ExternalData component allows you to execute a JavaScript function. The sample code inside the Script Editor shows an example of executing JavaScript functions.
Return value defines the JSON data which your Form Template can use; therefore, the return must always be a JSON Object.
Last updated