A SQL Group is a collection of queries which share SQL syntax. SQL Groups are determined by the following algorithm:
- comments are ignored
- string constants and literals are ignored
- table names are preserved
- all SQL directives are preserved
The following query:
/* INTERMIX_ID: eyJkYWciOiAi9sb2FkIn0= */ insert into my_schema.my_table (grosysid, groname, user_id, scantime) values (102, 'readers', 105, '2018-08-06 23:20:03');
has a SQL Group Text of:
INSERT INTO INTERMIX_RAW_LOGS MY_TABLE GROSYSID GRONAME USER_ID SCANTIME VALUES
All subsequent queries that match this pattern will be grouped together.
Use SQL Groups
A SQL Group can be uniquely identified by it's ID, whic is a 128-bit hash of the SQL Group Text. The ID is used to filter by a SQL Group in the product. The SQL Group Text is simply there for display purposes.
Group by SQL Groups in the Analyze page. This can be done by selecting 'SQL Group' in the Group By section of the Analyze Filters.
Filtering by SQL Group
Use the ID of the SQL Group when filtering. The ID is prepended to the SQL Group Text everywhere in the product.
To add a filter simply copy/paste the ID into the value field: