go to post Dmitry Maslennikov · Apr 10, 2023 Some scenarios may require the ability to insert a new row with IDENTITY not default, and in this case you would need to use ALLOWIDENTITYINSERT = 1 CREATE TABLE (..) WITH %CLASSPARAMETER ALLOWIDENTITYINSERT = 1; Some additional details here
go to post Dmitry Maslennikov · Apr 10, 2023 Or just add this to the end of docker run command -a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"
go to post Dmitry Maslennikov · Apr 9, 2023 I wanted to implement it as part of irissqlcli, but did not have time yet.
go to post Dmitry Maslennikov · Apr 7, 2023 or irissqlcli iris://_SYSTEM:SYS@localhost:1972/USER < c:\InterSystems\mysqlcode.txt
go to post Dmitry Maslennikov · Apr 3, 2023 It's a bit more complicated for this task. It always should return the full datetime, for instance if I trunc to quarter, it should return 2023-04-01 for the current day
go to post Dmitry Maslennikov · Apr 3, 2023 Implemented it with SQL Procedure CREATE OR REPLACE PROCEDURE %ZDJANGO.CLONE_DATABASE(sourceNS %String, targetNS %String) LANGUAGE OBJECTSCRIPT { new $namespace set $namespace = "%SYS" $$$ThrowOnError(##class(Config.Namespaces).Get(sourceNS, .sourceNSparams)) $$$ThrowOnError(##class(Config.Namespaces).Get(targetNS, .targetNSparams)) for kind="Globals", "Routines" { $$$ThrowOnError(##class(Config.Databases).Get(sourceNSparams(kind), .sourceDBparams)) $$$ThrowOnError(##class(Config.Databases).Get(targetNSparams(kind), .targetDBparams)) set from = sourceDBparams("Directory") set to = targetDBparams("Directory") quit:$Data(done(to)) set done(to) = "" $$$ThrowOnError(##class(SYS.Database).Copy(from, to, , , 4)) } } DANGER: Do not use it, made specifically for my case, it may overwrite database
go to post Dmitry Maslennikov · Apr 3, 2023 The issue is in quotes, try some other combination. Your whole call in single quotes, then you don't need to escape double quotes inside
go to post Dmitry Maslennikov · Apr 3, 2023 Python WON One of the winner's articles uses my project SQLAlchemy-IRIS. And one more could use it too, and there is an example with it in the comments.
go to post Dmitry Maslennikov · Apr 3, 2023 You can do this query SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' Filter by TABLE_TYPE is to get rid of system tables
go to post Dmitry Maslennikov · Apr 3, 2023 Example of using SQLAlchemy+Pandas, works with this Cloud SQL as well from sqlalchemy import create_engine import pandas as pd server = '<your-server-hostname>' port = 1972 namespace = 'USER' username = 'SQLAdmin' password = '<YOUR_PASSWORD>' url = f"iris://{username}:{password}@{server}:{port}/{namespace}" print(url) engine = create_engine(url) df = pd.DataFrame({ 'int': [1, 2, 3, 4, 5], 'float': [1.1, 2.2, 3.3, 4.4, 5.5], 'string': ['a', 'b', 'c', 'd', 'e'], 'datetime': pd.date_range('20130101', periods=5), 'bool': [True, False, True, False, True] }) # create a table in IRIS df.to_sql('iris_table', engine, if_exists='replace', schema='sqlalchemy') # read the table back from IRIS df2 = pd.read_sql_table('iris_table', engine, schema='sqlalchemy') # print the dataframe print(df2)
go to post Dmitry Maslennikov · Mar 29, 2023 Squirrel actually already has a driver definition for Caché and IRIS out of the boxAnd DBeaver has this ability too
go to post Dmitry Maslennikov · Mar 29, 2023 Could you update the article and extract the tutorial out of pdf?
go to post Dmitry Maslennikov · Mar 28, 2023 Yeah, the VSCode plugin has not been updated for a while. The ObjectScriptQuality plugin itself already has new ARM64 support. We'll check and update the extension soon.
go to post Dmitry Maslennikov · Mar 24, 2023 Have a look at some of my projects which can help with this contest irissqlcli - REPL for IRIS SQL sqlalchemy-iris dialect for SQLAlchemy, can be used with Pandas, Flask or FastAPI django-iris driver for Django dbt-iris adapter for dbt Give it a try and let me know if you have any issues with them, I can help to solve
go to post Dmitry Maslennikov · Mar 22, 2023 Well, it’s not so old, it is definitely supports SourceControl class