Giter Site home page Giter Site logo

database-plugins's Introduction

database-plugins

In order to run integration tests for these plugins you should have running database instance. It may be running on host machine or in docker container. Tests create tables and sample data, so user configured via system property should have corresponding permissions. To run integration tests execute following command in shell:

mvn clean test \ 
-DauroraMysql.clusterEndpoint=cdap-cluster.xyz.eu-central-1.rds.amazonaws.com -DauroraMysql.port=3306 \
-DauroraMysql.database=cdapdb -DauroraMysql.username=cdap -DauroraMysql.password=cdap \
-DauroraPostgresql.clusterEndpoint=pginstance.cxywmbgwp60k.eu-central-1.rds.amazonaws.com -DauroraPostgresql.port=5432 \
-DauroraPostgresql.database=cdappg -DauroraPostgresql.username=cdap -DauroraPostgresql.password=cdap \
-DjdbcDriversJars="/jdbc/drivers/jars/some.jar, "

Notice that you must change properties for Aurora MySQL and Aurora Postgresql to real before running tests.

Setup Local Environment

MySQL, Postgresql, MSSQL, DB2, MemSQL, SAP HANA are using prebuild images.

Oracle DB image should be build separately.

MemSQL image should be configure after start.

Note that you should login into docker account to pull SAP HANA image. Account can be created here Also, please note SAP HANA is sensitive to some CPU instructions. CPU model "host-passthrough" or similar can be required if running inside VM. SAP HANA requires that password for DB is provided through url. Convenience script docker-compose/db-plugins-env/saphana-password-server.sh provided for this purpose.

Netezza and Teradata require VMware Player for running emulator.

cd docker-compose/db-plugins-env/
  • Export your license key for MemSQL to environment variable:
export MEMSQL_LICENSE_KEY=YOUR_LICENSE_KEY
  • Initialize Memsql container:
docker-compose up memsql
  • Start SAP HANA password service
bash saphana-password-server.sh &
  • Start docker environment by running commands:
cd docker-compose/db-plugins-env/
docker-compose up -d
  • Connect to MemSQL Studio at http://localhost:8888 The default Username is root and Password should be left blank.
  • Create mydb database in MemSQL Studio
create database mydb
  • Set password for root user in MemSQL Studio
grant all on *.* to 'root'@'%' identified by 'root' with grant option;

Properties

MySQL

  • mysql.host - Server host. Default: localhost.
  • mysql.port - Server port. Default: 3306.
  • mysql.database - Server namespace for test databases. Default: mydb.
  • mysql.username - Server username. Default: root.
  • mysql.password - Server password. Default: 123Qwe123.

Postgresql

  • postgresql.host - Server host. Default: localhost.
  • postgresql.port - Server port. Default: 5432.
  • postgresql.database - Server namespace for test databases. Default: mydb.
  • postgresql.username - Server username. Default: postgres.
  • postgresql.password - Server password. Default: 123Qwe123.

MSSQL

  • mssql.host - Server host. Default: localhost.
  • mssql.port - Server port. Default: 1433.
  • mssql.database - Server namespace for test databases. Default: tempdb.
  • mssql.username - Server username. Default: sa.
  • mssql.password - Server password. Default: 123Qwe123.

DB2

  • db2.host - Server host. Default: localhost.
  • db2.port - Server port. Default: 50000.
  • db2.database - Server namespace for test databases. Default: mydb.
  • db2.username - Server username. Default: db2inst1.
  • db2.password - Server password. Default: 123Qwe123.

Oracle

  • oracle.host - Server host. Default: localhost.
  • oracle.port - Server port. Default: 1521.
  • oracle.username - Server username. Default: SYSTEM.
  • oracle.password - Server password. Default: 123Qwe123.
  • oracle.database - Server sid/database. Default: cdap.
  • oracle.connectionType - Server connection type (service/sid) Default: sid.

Netezza

  • netezza.host - Server host. Default: localhost.
  • netezza.port - Server port. Default: 5480.
  • netezza.database - Server namespace for test databases. Default: mydb.
  • netezza.username - Server username. Default: admin.
  • netezza.password - Server password. Default: password.

MemSQL

  • memsql.host - Server host. Default: localhost.
  • memsql.port - Server port. Default: 3308.
  • memsql.database - Server namespace for test databases. Default: mydb.
  • memsql.username - Server username. Default: root.
  • memsql.password - Server password. Default: root.

Teradata

  • teradata.host - Server host. Default: localhost.
  • teradata.port - Server port. Default: 1025.
  • teradata.database - Server namespace for test databases. Default: mydb.
  • teradata.username - Server username. Default: test.
  • teradata.password - Server password. Default: test.

Aurora MySQL

  • auroraMysql.clusterEndpoint - Cluster endpoint.
  • auroraMysql.port - Server port.
  • auroraMysql.database - Server namespace for test databases.
  • auroraMysql.username - Server username.
  • auroraMysql.password - Server password.

Aurora Postgresql

  • auroraPostgresql.clusterEndpoint - Cluster endpoint.
  • auroraPostgresql.port - Server port.
  • auroraPostgresql.database - Server namespace for test databases. Default: mydb.
  • auroraPostgresql.username - Server username.
  • auroraPostgresql.password - Server password.

database-plugins's People

Contributors

itsankit-google avatar ibarbashov avatar seanzhougoogle avatar albertshau avatar mrrahulsharma avatar aryan-verma avatar vhlinskyi avatar curiousvini avatar yaojiefeng avatar avirmani avatar jayfjin avatar vipinofficial11 avatar mlozbin-cybervisiontech avatar anew avatar vikasrathee-cs avatar sagarkapare avatar meseifan avatar sumengwang avatar rmstar avatar sechegaray avatar sawantpritam avatar jessieyee avatar jster1357 avatar akhalymon avatar bharatgulati avatar itsmekumari avatar nikitapaliwal123 avatar fernst avatar adinilfeld avatar snehalakshmisha 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.