LogoLogo
Zero Density PortalZero Density Academy
Reality 5.4 SP1
Reality 5.4 SP1
  • Reality 5.4 SP1
    • What's New
    • From Reality 5.4 to Reality 5.4 SP1
    • User Guide
      • What is Reality Editor?
      • What is Reality Engine?
      • What is Reality Hub?
        • System Overview
      • What is Lino?
      • Reality Workflow
      • Launcher
        • Launcher Interface
        • Engine Status Colors
        • Engine Display Window
        • New Launch Configuration
      • Nodegraph/Actions
        • Nodegraph
          • Node Structure
          • Node Details Panel
            • Property
            • Function
            • Function Property
            • Advanced Property
            • Node Details Info Display
            • Node Property Toolset
            • Property Watch Panel
          • Nodegraph Context Menus
            • Node Context Menu
            • Node Property Context Menu
            • Timeline Property Context Menu
            • Pin Context Menu
          • Nodegraph Menu
            • Graphs
          • Portal Pin
          • Sink Pin
          • Reroute
          • Experimental Node Category
          • Node Comment
          • Asset Browser
          • Advanced Preview Monitor
          • Operating Nodegraph
            • Navigating Inside Nodegraph
            • Creating Node
            • Node Connections
            • Incrementing and Changing Numerical Fields
            • Multiple Node Operations
            • GamePad
            • Node Info Display
            • Simplifying Node Network
            • Dynamic Nodes
              • Dynamic Node Operations
          • Node Library
            • Swizzle Node
            • Read Video Node
        • Actions
          • Action Timeline Interface
          • Keyframe Types
          • Interpolations
          • Operating Actions
            • Navigating Inside Actions Module
            • Animating Property
            • Triggering Multiple Actions via Single Button
            • Utilizing Initial Keyframe
            • Duplicating Keyframes
            • Reversing Animation
          • Animation Workflow Tips
        • Form Builder
          • Form Builder Interface
          • Form Builder Components
          • Customizing Component Appearance
          • Operating Form Builder
          • Data Integration
        • Gang Mode
          • Activating Gang Mode
          • Operating Gang Mode
      • Playout
        • Operating Playout
      • Newsroom
      • Cook Manager
      • User Management
        • Advanced User Management
          • User Management UI
          • Role of the Admin and Administrators
          • Example Configuration
            • Creating Administrator Account
            • Creating User Groups
            • Creating Policies
            • Creating New Users
            • Assigning Users to Groups
            • Defining User Groups Policy
          • License Reservation
        • Basic User Management
      • Hardware Monitor
        • Configuration
        • Filter
          • Metrics
          • Hardware
        • Specs
        • Metric Display
        • Plot
      • Controlling Lino
        • Preperations
        • Enabling Plugins
        • Modifying Editor and Project Settings
        • Utilizing Default Motion Design Level
        • Exposing Outliner Assets to RCP
        • Creating Property Animation
        • Creating Motion Design Rundown
          • Adding Template
          • Creating Pages
        • Broadcast Settings
          • Signalling URL for Server Configurations
        • Defining Preview Channel
        • Configuring Reality Hub for Lino
        • Lino Module User Interface
        • Advanced Preview Monitor for Lino
      • Controlling Unreal Engine Vanilla
        • Introduction
        • Supported Versions
        • Available Features
        • UState
          • UState User Interface
          • APM for Unreal Engine
        • Configuration
          • Unreal Engine Configuration
          • Configuring Reality Hub for Unreal Engine
        • Example Pipeline
          • Preparation
          • Exposing Actor Functions
          • Exposing Actor Parameters
          • Grouping Exposed Items
          • Creating Logic
          • Viewport Navigation
          • Unreal Project inside Reality Hub
          • Playing Video Files
          • Operating
    • Installations
      • System Requirements
      • Reality Software Component Versions
      • Downloading Distributions
      • Reality Distribution Content
      • Installations
        • Installing Reality 5.4 SP1
        • Installing Reality Hub
          • Upgrading and Downgrading
          • Database Backup and Restore
          • Database Recovery
          • Recap
      • Licensing Reality
        • Licensing Reality 5.4
          • Reality License Backup and Restore
        • Licensing Reality Hub
    • Configurations
      • Configuring Peripheral Devices
        • NVidia Configuration
        • AJA Configuration
      • Configuring Reality Hub
        • General Configuration
        • Reality Loader
          • RealityEngine AMPERE Led Display
        • Engine Module Configuration
          • Adding Host
          • Adding Groups
          • Channel Assignments
          • General Engine Configuration
        • Project Configuration
        • Project Scanning
        • Cache Management
        • SSL Configuration
        • HTTP Proxy Configuration
        • Template Form Configuration
    • Integrations
      • Octopus Integration
        • Reality Hub MOS Configuration for Octopus
        • Octopus Configuration
        • Utilizing ZD MOS Plugin
      • iNEWS Integration
        • Reality Hub MOS Configuration for iNEWS
        • iNEWS Configuration
      • CII Module Configuration
    • Tutorials
      • Reality Actor Spawning
      • Using Plugins
      • Tracked Billboard
      • Green Screen Virtual Studio
      • Shadow and Ambient Occlusion in Augmented Reality
      • Curved LED Pipeline with Curve XR Node
        • Features
        • Preparation
        • Curve XR Node Details
        • Example Pipeline
      • Color Grading with 3D LUT Files
      • Utilizing Custom Cyclorama Mesh
      • Using Volumetric Cube Mask
      • Texture Input Workflow
        • Creating Dynamic Material
        • Creating Virtual Screen Blueprint Actor
        • Adding Variables
        • Creating Event Graph
        • Creating Construction Script
        • Exposing Texture Input Pin in Reality Hub Nodegraph
      • Custom Projection Mesh Pipeline
    • Reality Hub Developers Guide
      • Reality Hub Open-Source SDK
      • REST API
    • FAQ
      • Understanding Reality Hub UI Warnings
      • Frequently Asked Questions
      • Glossary
      • How to Read this Documentation
Powered by GitBook
On this page
  • Data Integration Workflow
  • Reality External Data
  • Download Data From URL
  • Execute a JavaScript Function
  1. Reality 5.4 SP1
  2. User Guide
  3. Nodegraph/Actions
  4. Form Builder

Data Integration

PreviousOperating Form BuilderNextGang Mode

Last updated 11 months ago

Reality Hub 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.

Reality Hub 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 Reality Hub may have to apply the following steps:

  1. Designing content inside an Engine.

  2. Exposing variables/functions to Reality Hub.

  3. Launching the project via module or playing the project in the Editor Mode.

  4. Building a Form Template based on the of the node.

  5. Adding the HTTPS/JSON/JS component to

  6. Defining the data source in the Settings.

  7. Assigning key names based on incoming data.

  8. Checking results via 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.

/**
 * Body of an async function
 * @param {object} params Parameters
 * @param {object} params.input A key-value object which stores the value of inputs in Remote Data fieldset.
 * @param {object} params.data The downloaded data. If the download checkbox is unchecked then this is set to null.
 * @returns {Promise<*>} JSON data
 */
  try {
    const { fetchURL, executeSQL, fetchCSV, fetchXLSX } = imports;
    
    const targetURL = `${new URL(document.location).origin}/examples/city-weather-dyn.json?city=${params.input.city}&range=${params.input.from}-${params.input.to}`;
    // To fetch data from a website with query string, you can use the following stub.
    const data = await fetchURL(targetURL, { format: "json" });
    // To fetch data from a given database, you can use the following stub.
    /*
    const data = await executeSQL({
      dialect: "pg",
      // dialect: "mysql",
      // dialect: "mssql",
      // dialect: "sqlite",
      host: "127.0.0.1",
      port: "5432",
      database: "db_name",
      user: "db_user",
      password: "db_password",
      query: "SELECT COLUMN_NAME FROM TABLE_NAME"
    });
    */
    // To fetch data from a given csv path and parse it then, which can be a local path or an URL containing csv file
    // , you can use the following stub.
    /*
    const data = await fetchCSV({
      path: "https://people.sc.fsu.edu/~jburkardt/data/csv/addresses.csv",
      option: { separator: ',', headers: false }
    })
    */
    // To fetch data from a given xlsx path, you can use the following stub.
    /*
    const data = await fetchXLSX({
       path: "https://file-examples-com.github.io/uploads/2017/02/file_example_XLS_10.xls"
    });
    */
    return data;
  } catch (ex) {
    console.trace(ex);
    // Throwing errors other than `TransformError` will display a generic error message.
    throw ex;
  }
Launcher
Properties and Functions
Form Template
Field
Playout
External Data Component
ExternalData Component
ExternalData Field Settings
Reality Hub Script Editor