Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Unlock your Microsoft Excel data with Red Hat JBoss Data Virtualization

February 9, 2017
Madou Coulibaly
Related topics:
Developer Tools
Related products:
Developer ToolsRed Hat JBoss Enterprise Application Platform

Share:

    After Unlock your MariaDB/MySQL data, Unlock your PostgreSQL data, and Unlock your Hadoop data with Hortonworks episodes, let's continue the journey with this new episode of the series: "Unlock your [….] data with Red Hat JBoss Data Virtualization." Through this blog series, we will look at how to connect Red Hat JBoss Data Virtualization (JDV) to different and heterogeneous data sources.

    JDV is a lean, virtual data integration solution that unlocks trapped data and delivers it as easily consumable, unified, and actionable information. It makes data spread across physically diverse systems — such as multiple databases, XML files, and Hadoop systems — appear as a set of tables in a local database. By providing the following functionality, JDV enables agile data use:

    1. Connect: Access data from multiple, heterogeneous data sources.
    2. Compose: Easily combine and transform data into reusable, business-friendly virtual data models and views.
    3. Consume: Makes unified data easily consumable through open standards interfaces.

    It hides complexities, like the true locations of data or the mechanisms required to access or merge it. Data becomes easier for developers and users to work with.

    This post will guide you step-by-step on how to connect JDV to a Microsoft Excel spreadsheet using Teiid Designer and the Microsoft Excel translator. A translator acts as the bridge between JBoss Data Virtualization and an external system. The Microsoft Excel translator provides a quick and easy way to read a Microsoft Excel spreadsheet and provides contents of the spreadsheet in the tabular form that can be integrated with other sources.

    Prerequisites

    • JDV 6.3 Environment

      Download: https://developers.redhat.com/products/datavirt/overview
      Install: https://developers.redhat.com/products/datavirt/hello-world/#_install-configure-jboss-data-virtualization

      We will refer to the installation directory of JDV 6.3 as $JDV_HOME.

    • Red Hat JBoss Developer Studio (JBDS) 9.1.0 with Teiid Designer plugins

      Download: https://developers.redhat.com/download-manager/file/jboss-devstudio-9.1.0.GA-installer-eap.jar
      Install: https://developers.redhat.com/products/datavirt/hello-world/#_set-up-dev-environment

    • Microsoft Excel Spreadsheet

      We need an Excel document (.xlsx) to connect to with JDV

      In this example, we will use the Microsoft Excel spreadsheet "unlockdata.xlsx" available on https://github.com/cvanball/unlock-your-data/tree/master/msexcel/data.

      We will refer to the directory with this document as $DATA_HOME

    • Microsoft Excel Translator

      The Microsoft Excel Translator is provided with JDV. No installation needed.
      This translator uses Apache POI libraries to access to Microsoft Excel spreadsheets so it works whatever the platform including Windows and Linux.

    Create the File Datasource

    1. Start your local JDV 6.3 environment then start the CLI tool
      $ $JDV_HOME/bin/standalone.sh
      $ $JDV_HOME/bin/jboss-cli.sh --connect
    2. Display all the properties supported by the File Connector
      [standalone@localhost:9999 /] /subsystem=teiid:read-rar-description(rar-name=file)
      

      Here, we are going to use the following properties:

      ParentDirectory: Directory where the data files are stored.
      AllowParentPaths: Set AllowParentPaths to false to disallow '..' in paths. This prevents requesting files that are not contained in the parent directory. Optional.
      
    3. Add the File Datasource and enable it
      [standalone@localhost:9999 /] batch
      [standalone@localhost:9999 / #] /subsystem=resource-adapters/resource-adapter=file/connection-definitions=UnlockData_MSExcel_DS:add(jndi-name=java:/UnlockData_MSExcel_DS, class-name=org.teiid.resource.adapter.file.FileManagedConnectionFactory, enabled=true, use-java-context=true)
      [standalone@localhost:9999 / #] /subsystem=resource-adapters/resource-adapter=file/connection-definitions=UnlockData_MSExcel_DS/config-properties=ParentDirectory:add(value=absolute path of $DATA_HOME)
      [standalone@localhost:9999 / #] /subsystem=resource-adapters/resource-adapter=file/connection-definitions=UnlockData_MSExcel_DS/config-properties=AllowParentPaths:add(value=true)
      [standalone@localhost:9999 / #] /subsystem=resource-adapters/resource-adapter=file:activate
      [standalone@localhost:9999 / #] run-batch

    What about automating configuration? (Optional)

    A question you might ask: Can we automate the above configuration steps? The answer is yes. We can, with Ansible, by Red Hat.

    Logotype_RH_Ansible_RGB_Gray

    Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs. It uses no agents and no additional custom security infrastructure, so it’s easy to deploy – and most importantly, it uses a very simple language (YAML, in the form of Ansible Playbooks) that allow you to describe your automation jobs in a way that approaches plain English. For your convenience, most of the steps are automated in an ansible playbook called msexcel on GitHub and to run you only need to run one command and you should see similar output as shown below:

    $ cd unlock-your-data/msexcel
    $ ansible-playbook local.yml
    PLAY [Configure local JBoss Data Virtualization to connect to Excel spreadsheets] ***
    
    TASK [setup] *******************************************************************
    ok: [localhost]
    
    TASK [Execute Management CLI file(s)] ******************************************
    changed: [localhost] => (item=add_datasource.cli)
    
    PLAY RECAP *********************************************************************
    localhost                  : ok=2    changed=1    unreachable=0    failed=0

    Note: See https://github.com/cvanball/unlock-your-data/tree/master/msexcel for more information.

    Start Your Development Environment

      1. Start your local JDV 6.3 environment
        $ $JDV_HOME/bin/standalone.sh
      2. Start your local JBDS environment

        Start JBDS 9.1.0 and open the Teiid Designer Perspective as shown below:
        Start your local JBDS environment
        Note: Use the following menu options "Window" > "Perspective" > "Open Perspective" > "Other..." > "Teiid Designer" to set JBDS in Teiid Designer perspective

    Create Your Teiid Project

      1. Create Teiid Model Project called "MSExcelSample"

        Create a new Teiid Model project using right-click "New" > "Teiid Model Project" in the Model Explorer window as shown below:
        Create a new Teiid Model project using right-click

      2. Import Metadata using Teiid connection

        We are now going to import metadata directly using the Teiid connection. Right-click the project "MSExcelSample" and select Import and select "Teiid Connection >> Source Model" as shown above and click "Next >".
        Import Metadata using Teiid connection

     

    Create Your Source Model

    1. Select the Datasource "UnlockData_MSExcel_DS"

      Click "Next >"
      Select the Datasource UnlockData MSExcel DS

    2. Configuration the translator

      Select the translator "excel" and fill the Import Properties with the following information:

      Data Row Number = 2
      Excel File = unlockdata.xlsx
      Header Row Number = 1

      Click "Next >"
      Configuration the translator

      Specify the target folder for the source models (here "MSExcelSample/DataSourceLayer") and the name of this Source model (Hint: UnlockData_MSExcel_DS). Click "Next >".
      Specify the target folder for the source models

      Check the box "Set all tables read-only (UPDATABLE FALSE)" then click "Next >".

      Click "Finish" to create the source model.
      Click Finish to create the source model.

    Preview Data

    Select any model and click the running man icon to preview the data as depicted below:

    Click Finish to create the source model

    Click Finish to create the source model

    Conclusion

    In this post, we've shown the configuration steps needed to perform in order to unlock your Microsoft Excel data with Red Hat JBoss Data Virtualization.

    Now we are ready to federate this data with other data sources from physically distinct systems into such as other SQL databases, Hadoop systems, NoSQL databases, enterprise applications and web services etc.

    For more information about Red Hat JBoss Data Virtualization or Ansible, please refer to the following websites:

    • https://developers.redhat.com/products/datavirt/overview
    • http://www.ansible.com
    Last updated: November 9, 2023

    Recent Posts

    • Meet the Red Hat Node.js team at PowerUP 2025

    • How to use pipelines for AI/ML automation at the edge

    • What's new in network observability 1.8

    • LLM Compressor: Optimize LLMs for low-latency deployments

    • How to set up NVIDIA NIM on Red Hat OpenShift AI

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue