Git Product home page Git Product logo

jdv-customer's Introduction

JDV Customer

Overview

An JDV Project that connects one database table (Postgresql) and one CSV file.

Folder/files overview

Standalone Deployment (EAP)

Requirements

  • JBoss Developer Studio 8.1.0 with Teiid plugin
  • JDK 1.8+
  • JBoss EAP 6.4+

Source Code

The project source code is in src directory and consists in a JBoss Developer Studio 8.1.0 GA Teiid Model Project. It has:

  • Sources
    • For CSV files and Postgresql database
  • Views
    • Models for the sources, with joins and materialized view tables
  • VDB

Database setup

If you have Docker Engine on your host, just run the database/initdb-container.sh script. It will spin up a Postgres conatiner with our DB preloaded for this demo.

EAP setup

It is necessary to have the following resources created in EAP:

  • Datasource
    • jndi-name="java:/CadastroCliente"
      • Example (change the URL/username/password as needed):
            <datasource jndi-name="java:/CadastroCliente" pool-name="CadastroCliente" enabled="true">
                <connection-url>jdbc:postgresql://postgresql:5432/redhat</connection-url>
                <driver>postgresql</driver>
                <security>
                    <user-name>redhat</user-name>
                    <password>redhat@123</password>
                </security>
            </datasource>
        
  • Resource Adapter
    • resource-adapter id="RendaCartao"
      • Example (change the Path/file name as needed):
            <resource-adapter id="CNPJSource">
                <module slot="main" id="org.jboss.teiid.resource-adapter.file"/>
                <transaction-support>NoTransaction</transaction-support>
                <connection-definitions>
                    <connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory" jndi-name="java:/CNPJSource" enabled="true" pool-name="CNPJSource">
                        <config-property name="ParentDirectory">
                            /home/jboss/source/files/
                        </config-property>
                    </connection-definition>
                </connection-definitions>
            </resource-adapter>
        

EAP Deployment

Copy the file jdv-customer.vdb to deployment folder of your EAP instance.

JDBC setup

The VDB will be available at this URL: jdbc:teiid:jdv-customer@mm://localhost:31000.

JDBC test

You can test your VDB using the following SQL statements:

  • select * from Cliente;

Folder/files overview

Used folders:

  • src
  • files
  • database

jdv-customer's People

Contributors

danielbgg avatar rafaeltuelho avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.