Skip to content

MSW. An example repository using PostgreSQL SQLgateway to demonstrate exporting and importing instances

License

Notifications You must be signed in to change notification settings

SergeyMi37/apptools-gateway-demo

Repository files navigation

apptools-sqlgateway-demo

An example repository using PostgreSQL SQLgateway to demonstrate exporting and importing instances of the %Library.SQLConnection class with copying jdbc drivers. This is especially useful when you want to copy items to another iris server through the package manager's private registry while keeping your private settings.

Demo

Credits

  1. OEX package migration-pg-iris-dataset provided by YURI MARX PEREIRA GOMES

    • Special thanks as this was an excellent base to start off.
  2. Article about PostgreSQL into Docker:

  3. Git project created from:

  4. OEX package db-migration-using-SQLgateway provided by Robert Cemper

    • Thank you so much as this is a great project to learn and practice new skills.

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

Clone/git pull the repo into any local directory

git https://github.com/SergeyMi37/apptools-sqlgateway-demo.git
  1. Build
docker-compose build
  1. Run it in foreground. Sometimes container start is slower than estimated.
docker-compose up

docker-compose exec iris iris session iris

How to Test it

Open IRIS terminal and export the settings to a file:

zn "%SYS"
write ##class(apptools.core.json).ExportClassInstances("%Library.SQLConnection","select * FROM %Library.sys_SQLConnection where isJDBC = 1","/tmp/gateways.json")

Check database connection:

%SYS>do $system.SQLGateway.TestConnection("postgres")

Import zpm application with drivers

%SYS>zpm "install appmsw-gateway-sql"
...

See what drivers can be installed:

%SYS>do ##class(appmsw.gateway.jdbc).ImportSQLConnection("view")


Import drivers to instance:

%SYS>do ##class(appmsw.gateway.jdbc).ImportSQLConnection()

About

MSW. An example repository using PostgreSQL SQLgateway to demonstrate exporting and importing instances

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published