irismysql

Downloads2
Subscribe
0
Bookmark
0
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Issues
Videos
Articles
Reports

What's new in this version

Initial Release

AUTHOR - Raman Sailopal

BACKGROUND - Utility to translate mysql tables into IRIS globals

PREREQUISITES - It is assumed that a working version of Intersystems IRIS as well as mysql or mariadb is running

It is also assumed that the iriscmd is installed as instructed here - https://github.com/RamSailopal/iriscmd

PARAMETERS - - 1 - User name for mysql - 2 - Password for mysql - 3 - mysql host to connect to - 4 - mysql user name - 5 - mysql password - 6 - Intersystems IRIS instance name - 7 - Intersystems IRIS namespace

USAGE - irismysql "sqluser" "sqlpass" "localhost" "test" "test_tab" "IRIS" "USER"

EXAMPLE -

Assuming a mysql table test_tab in database test described as follows:

+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| col1  | double      | NO   |     | NULL    |       |
| col2  | double      | NO   |     | NULL    |       |
| col3  | varchar(50) | NO   | PRI | NULL    |       |
+-------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)

And with data:

+--------+--------+-----------+
| col1   | col2   | col3      |
+--------+--------+-----------+
| 1.5142 | 0.7207 | TEST1     |
| 3.5012 |  0.479 | TEST2     |
| 0.0134 | 0.0027 | TEST3     |
| 3.8937 | 1.0071 | TEST4     |
+--------+--------+-----------+

4 rows in set (0.00 sec)

Running the utility will create a global as follows:

Global ^test.testtab
^test.testtab("TEST1","col1")=1.5142
                      "col2")="0.7207"
^test.testtab("TEST2","col1")=3.5012
                      "col2")="0.479"
^test.testtab("TEST3","col1")="0.0134"
                      "col2")="0.0027"
^test.testtab("TEST4","col1")=3.8937
                      "col2")=1.0071

IMPORTANT - The utility will abort if there is no primary key assigned to any columns in the table as the primary key will be translated to the primary subscript for the global

INSTALLATION - Run:

git clone https://github.com/RamSailopal/irismysql.git
mv irismysql/irismysql /usr/local/bin 	
Rating
2 (1)
Category
Integration
Works with
InterSystems IRIS
Tags
Info
Version
1.0.0
Last updated
2021-04-09
Repository
Open
Documentation
Open
License
Link