In this article, I will introduce my application iris-VectorLab along with step by step guide to performing vector operations.
IRIS-VectorLab is a web application that demonstrates the functionality of Vector Search with the help of embedded python. It leverages the functionality of the Python framework SentenceTransformers for state-of-the-art sentence embeddings.
Application Features
Text to Embeddings Translation.
VECTOR-typed Data Insertion.
View Vector Data
Perform Vector Search by using VECTOR_DOT_PRODUCT and VECTOR_COSINE functions.
Demonstrate the difference between normal and vector search
The basic idea is to use Vectors in the mathematical sense. I used geographic coordinates. These are of course only 2-dimensional but much easier to follow as vectors in text analysis with >200 dimensions.
Did you know that you can get JSON data directly from your SQL tables?
Let me introduce you to 2 useful SQL functions that are used to retrieve JSON data from SQL queries - JSON_ARRAY and JSON_OBJECT. You can use those functions in the SELECT statement with other types of select items, and they can be specified in other locations where an SQL function can be used, such as in a WHERE clause
The JSON_ARRAY function takes a comma-separated list of expressions and returns a JSON array containing those values.
Building my tech. example provided me with a bunch of findings htt I want to share. The first vectors I touched appeared with text analysis and more than 200 dimensions. I have to confess that I feel well with Einstein's 4 dimensional world. 7 to 15 dimensions populating the String Theory are somewhat across the border. But 200 and more is definitely far beyond my mathematical horizon.
Imagine the scene. You are working happily at Widgets Direct, the internet's premier retailer of Widgets and Widget Accessories. Your boss has some devastating news, some customers might not be fully happy with their widgets, and we need a helpdesk application to track these complaints. To makes things interesting, he wants this with a very small code footprint and challenges you to deliver an application in less than 150 lines of code using InterSystems IRIS. Is this even possible?
I'm executing the same query with same column name but in different case. An unique cached query generated while query executed first time. The query preparser only normalize the keywords and send to the SQL engine generates the Hash. Eventually use the cached query next use.
Now my question, The hash values are same for both of the queries. Then why it creates two cached queries.
Query1: select * from MyLearn.Test where Name['Kev1'
Query2: select * from MyLearn.Test where NamE['Kev1'
The InterSystems IRIS has a series of facilitators to capture, persist, interoperate, and generate analytical information from data in XML format. This article will demonstrate how to do the following:
Capture XML (via a file in our example);
Process the data captured in interoperability;
Persist XML in persistent entities/tables;
Create analytical views for the captured XML data.
Capture XML data
The InterSystems IRIS has many built-in adapters to capture data, including the next ones:
I have a function that may end up being called from a number of transformations at the same time, and within the function there's some Embedded SQL to first check if a local table has an entry, and then adds the entry if it doesn't exist.
To prevent a race condition where the function is called by two transformations and they both end up attempting to insert the same value, I'm looking to use the table hint "WITH TABLOCK" on the insert, but this seems to be failing the syntax checks within vscode.
I was struggling with a procedure that was meant to receive a string and use it as a filter, I've found that since I want the procedure to do some data transformation and return a dataset, I needed to use objectScript language.
I've created the procedure using the SQL GUI in the portal, and everything works fine when calling the procedure from the SQL GUI but not through a JDBC connection here is the call "call spPatientOS('2024-04-07T12:35:32Z')"
I'm currently running into a very weird issue to where I am trying to connect with a 64 bit version of SQL Server Management Studio (SSMS) to a HealthShare instance. I have created a System DSN using the Drivers (image below) that were downloaded with the Client version of the install and I'm able to successfully connect using my credentials.
We're excited to announce a new version release of the SQLTools VS Code extension.
SQLTools connects VS Code users to the most commonly used databases using drivers, including InterSystems IRIS. With over 3.5 million downloads, it is helping users work with their data much more easily.
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.
There is a Link Procedure Wizard option within the Management Portal (System > SQL >Wizards > Link Procedure) which I had reliability issues with so I decided to use this solution instead.
I am currently adding a field to our Existing messaging from Epic, however there might be a possibility I need to back load data into the Ancillary system. While I have the previous messages that can be sent, they do not have this additional field that I am adding to the message.
I can do a lookup against Epic Clarity SQL Database; however, I don't want to throw a wrench into the workflow if the system cannot connect to the Epic Clarity SQL Database.
For example, I have two timestamp values ('2024-04-01 10:00:00', '2024-04-01 11:30:30'). I would like to find the difference between these two timestamps, and I need the result in hours:minutes:seconds (hh:mm:ss) format.
Expected Output: 01:30:30
Note: I need an SQL query command. I should not use ClassMethod, Function, or Stored Procedure.
Could anyone please provide me with an SQL query for my question?
Pandas is not just a popular software library. It is a cornerstone in the Python data analysis landscape. Renowned for its simplicity and power, it offers a variety of data structures and functions that are instrumental in transforming the complexity of data preparation and analysis into a more manageable form. It is particularly relevant in such specialized environments as ObjectScript for Key Performance Indicators (KPIs) and reporting, especially within the framework of the InterSystems IRIS platform, a leading data management and analysis solution.
I know that you can use Do $SYSTEM.SQL.Schema.ImportDDL() to insert sql files into IRIS however I was wondering if there is a way that I can upload .sqlite files into iris? I have about 20 .sqlite files that I need to get into my database. I tried using the ImportDDL method but it said "SKIPPING non-SQL SOURCE:"
What is Unstructured Data? Unstructured data refers to information lacking a predefined data model or organization. In contrast to structured data found in databases with clear structures (e.g., tables and fields), unstructured data lacks a fixed schema. This type of data includes text, images, videos, audio files, social media posts, emails, and more.
Using VECTOR_COSINE() in SQL query to perform a text similarity search on existing embeddings in a %VECTOR column.
Code is below.
Commented out sql query returns this error: SQLCODE: -29 Field 'NEW_EMBEDDING_STR' not found in the applicable tables^ SELECT TOP ? maxID , activity , outcome FROMMain .AITest ORDER BY VECTOR_COSINE ( new_embedding_str ,
Sql query as written returns ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'OSError'>: isc_stdout_write: PyArg_ParseTuple failed!
This is a full example how to use a %ScrollableResultSet for results pagination using %DynamicQuery:SQL and build a JSON response including page details.