Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramsailopal/irismysql
Linux command line utility to migrate mysql/mariadb tables into Intersystems IRIS globals
https://github.com/ramsailopal/irismysql
intersystems-iris mysql
Last synced: about 5 hours ago
JSON representation
Linux command line utility to migrate mysql/mariadb tables into Intersystems IRIS globals
- Host: GitHub
- URL: https://github.com/ramsailopal/irismysql
- Owner: RamSailopal
- License: mit
- Created: 2021-04-09T10:57:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-09T11:51:09.000Z (over 3 years ago)
- Last Synced: 2023-03-08T13:39:45.975Z (over 1 year ago)
- Topics: intersystems-iris, mysql
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 namespaceUSAGE - 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.0071IMPORTANT - 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