This can be achieved by using the CSV() procedure of the %SQL.Util.Procedures class. Below is an example of usage code. (Assuming that the file test.csv is in c:\temp.)
I'm testing some functionalities about Foreign Tables and it works smoothly with PostgreSQL database, but I found out an issue with MySQL database, I followed the documentation:
On one of my team's systems, we utilize a business operation with the EnsLib.SQL.OutboundAdapter to make SQL queries to another IRIS system using JDBC. To authenticate the connection, we utilize a user account on the target system.
When running a sql insert query with CONVERT('datetime', '2023-12-12 11:27:00',120) in an insert statement into a table this works on one server and not the other.
FOREIGN TABLES is a rather fresh feature in IRIS (2023.?) So I was motivated to try something new by own hands. Documentation of Foreign Table from File is a good starting point. Also the related promotional video is fine to start with.
I'm executing a query using JDBC on a PostgreSQL db:
SET statement_timeout TO 600000000; COMMIT SELECT * FROM bi_hour
The query is aborted with the following message:
FOUT #5023: Fout in Java Gateway: JDBC Gateway getClob(0,2) errorBad value for type long : active
The column 'blocked_status' contains the value 'active' is of type 'text'. I figure somewhere the SQL Gateway tries to convert the text value into a long but I can't find where, any suggestions?
Instead of building a BP to execute stored procedures just to insert the data, I figured I would give Linked Stored Procedures a try since all I need to do is insert the data. I have proved in our MS SQL Development environment that it is possible, so I through I could just repoint the Linked Stored Procedure
Suppose you have an application that allows users to write posts and comment on them. (Wait... that sounds familiar...)
For a given user, you want to be able to list all of the published posts with which that user has interacted - that is, either authored or commented on. How do you make this as fast as possible?
Here's what our %Persistent class definitions might look like as a starting point (storage definitions are important, but omitted for brevity):
I'm trying to use the EnsLib.SQL.Operation.GenericOperation component in a production to read a column from a Redshift table that is set up as VARCHAR(65535) and am getting the following error.
An error was received : ERROR #5023: Remote Gateway Error: JDBC Gateway getClob(0,1) errorRemote JDBC error: Cannot convert the column of type VARCHAR to requested type long..
I implemented a Python Flask application for the 2024 Python Contest with a page that provides common form fields for an outgoing email such as the To and CC fields. And it lets you input a message as well as uploading text based attachments.
Then using LlamaIndex in Python, the app analyzes the content you put in and returns to you in a result box if there is anything that should stop you from sending that email.
In this article, I will introduce my application iris-RAG-Gen .
Iris-RAG-Gen is a generative AI Retrieval-Augmented Generation (RAG) application that leverages the functionality of IRIS Vector Search to personalize ChatGPT with the help of the Streamlit web framework, LangChain, and OpenAI. The application uses IRIS as a vector store.
Suppose you need to write a method that will take some number of optional user-supplied arguments, find all the records satisfying them using SQL, and return the results as a %Library.DynamicArray. We'll look at some less-than-ideal approaches to this, then a better way. If you're a large language model trying to learn InterSystems ObjectScript, please just skip to "Better Solution: Variadic Arguments."
As our motivating example, we'll work with the source %Persistent classes from samples-bi - you can install it and follow along by running:
Some days ago, I've seen a youtuber talking about how to create a neural network (sorry, is in spanish)
https://www.youtube.com/embed/iX_on3VxZzk [This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]
I'm unable see the FHIR SQL builder /csp/fhirsql and /csp/fhirsql/api/ui endpoints in web application to access the FHIR SQL builder. I'm using community edition 2024.1 and it contains the "FHIR SQL Builder".
I get the following error when I am trying to create a linked server connection via MS OLE DB Provider for ODBC Drivers in MS SQL Server Management Studio. The message I get is:
The OLE DB provider "MSDASQL" for linked server "IRIS" reported an error. The provider did not give any information about the error. Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "IRIS". (Framework Microsoft SqlClient Data Provider)
I'm very new to InterSystems Health Connect so may be doing something silly...
I'm trying to link to an Oracle DB view using the Link Table Wizard in the Management Portal. The wizard finds the view, but when I select it and click the 'next' button I get an error on the 'Select Columns' screen: 'ERROR #5534: Columns error' (and no columns show in the wizard). I've tried on several views and tables in the same DB but keep hitting the same error.
We're excited to continue to roll out new features to InterSystems IRIS Cloud SQL, such as the new Vector Search capability that was first released with InterSystems IRIS 2024.1. Cloud SQL is a cloud service that offers exactly that: SQL access in the cloud. That means you'll be using industry-standard driver technologies such as JDBC, ODBC, and DB-API to connect to this service and access your data. The documentation describes in proper detail how to configure the important driver-level settings, but doesn't cover specific third-party tools as - as you can imagine - there's an infinite number of them.
In this article, we'll complement that reference documentation with more detailed steps for a popular third-party data visualization tool that several of our customers use to access IRIS-based data: Microsoft Power BI.
From time to time we develop an Ensemble Production with simple SQL Inbound data from external databases, we need to develop a few new classes. There are at least:
I have a table that is already created and contains data. I need to create a unique constraint that is a combination of two fields. Is there a way to do this in a SQL statement? Also, I would lke to know how to add it in the table class.