Initial Release
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.
OEX package migration-pg-iris-dataset
provided by YURI MARX PEREIRA GOMES
Article about PostgreSQL into Docker:
Git project created from:
OEX package db-migration-using-SQLgateway
provided by Robert Cemper
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
git https://github.com/SergeyMi37/apptools-sqlgateway-demo.git
docker-compose build
docker-compose up
docker-compose exec iris iris session iris
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()