Home Applications apptools-gateway-demo

apptools-gateway-demo

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
0 reviews
0
Awards
147
Views
0
IPM installs
0
0
Details
Releases
Reviews
Issues
Articles  (1)
Demo of exporting and importing instances of the SQL.Connection

What's new in this version

Initial Release

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()

Made with
Version
1.0.020 Nov, 2022
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
First published
20 Nov, 2022
Last checked by moderator
27 Jun, 2023Works