GermainUX can execute SQL queries against a configured database or the GermainUX Datamart. Query results can be included in an email, attached as a file, or used as part of an automated workflow.
🚀 Execution Modes
SQL Actions can run:
|
Mode |
|---|
|
Manually |
|
On a configurable schedule |
|
When an SLA condition is met |
🔧 Configure a SQL Action
✨ Using the Wizard
Go to GermainUX Workspace > Wizards > SQL Action.
⚙️ Using the Configuration Screen
Go to GermainUX Workspace > Automation > SQL.
Select an existing SQL Action to edit it, or click + to open the SQL Action wizard.
📖 SQL Action Reference
|
Workspace field |
Configuration key |
Description |
Possible values |
|---|---|---|---|
|
Name |
|
Unique name for the action. |
String |
|
Execute via Engine |
|
Executes the action through a GermainUX Engine. When enabled, a target server can be specified. |
Boolean |
|
Target Server |
|
MVEL expression used to identify the target server for remote execution. |
String |
|
Logging Enabled |
|
Records each execution of the action. |
Boolean |
|
Notify on Success |
|
Creates a notification when the action succeeds. |
Boolean |
|
Notify on Failure |
|
Creates a notification when the action fails. |
Boolean |
|
Execution Count |
|
Maximum number of executions allowed during the configured interval. |
Integer |
|
Execution Interval |
|
Period during which the execution-count limit applies. |
|
|
Distribution List |
|
Distribution list that receives the report. |
Existing distribution-list name |
|
Alert Template |
|
Template used to generate the report message. |
Existing template name |
|
Suppress Email if Result Is Empty |
|
Prevents report delivery when the query returns no results. |
Boolean |
|
Monitored Database |
|
Configured database against which the query runs. |
Existing database configuration |
|
Credentials |
|
Configured credentials used to connect to the database. |
Existing credential configuration |
|
Attach Result |
|
Attaches the query results to the report. |
Boolean |
|
Datamart Query |
|
Runs the query against the GermainUX Datamart. |
Boolean |
|
Run on Schedule |
|
Enables scheduled execution and allows a CRON expression to be defined. |
Boolean |
|
References |
|
Advanced references to credentials, configuration entries, or custom values used by the action or template. |
Reference collection |
|
SQL Queries |
|
Queries included in the SQL report. |
List of |
|
Triggered by SLAs |
— |
SLAs configured to trigger this action. |
Collection of SLAs |
📃 SQL Query Configuration
Each entry in sqlQueries can contain:
|
Property |
Description |
|---|---|
|
|
Unique name for the query. |
|
|
SQL statement to execute. |
|
|
Time interval applied to the query. |
|
|
Template used to name the result attachment. |
🔗 References
References allow the action or report template to access other GermainUX configuration objects securely.
|
Property |
Description |
Example |
|---|---|---|
|
|
Unique name used to reference the configuration item. |
|
|
|
GermainUX configuration collection key. |
|
|
|
Name of the item within the collection. |
|
|
|
Direct custom value when no configuration item is referenced. |
A non-sensitive report parameter |
A referenced property can be accessed with an expression such as:
${Credentials.username}
Use configured credentials for usernames, passwords, tokens, and other secrets. Do not store sensitive values directly in SQL statements, templates, or custom references.
📅 Example: Scheduled GermainUX Login Report
This example creates a daily email report containing an attachment with the GermainUX login activity recorded during the previous day.
1️⃣ Step 1: Configure the SQL Action
-
Go to GermainUX Workspace > Automation > SQL.
-
Click + to open the SQL Action wizard.
-
Enter a unique action name.
-
Select or create the distribution list that will receive the report.
-
Select or create the email template.
-
Enable Attach Result.
-
Click Next.
Configure the SQL Action - GermainUX
2️⃣ Step 2: Configure the Connection
To query the GermainUX Datamart, enable Run against GermainUX Datamart.
To query another database:
-
Select a configured database.
-
Select the credentials used to access it.
-
Test the connection, if that option is available.
-
Click Next.
Configure the Connection - GermainUX
3️⃣ Step 3: Add the SQL Query
Add the query that returns GermainUX login activity from the previous day.
A SQL Action can contain one or more queries. The selected database and credentials from the previous step determine where those queries execute.
Preview or validate the query results before continuing.
4️⃣ Step 4: Configure the Schedule
-
Enable Run on Schedule.
-
Configure the desired execution frequency or enter a CRON expression.
-
Set the report to run once per day at the required time.
-
Click Next.
Configure the Schedule - GermainUX
5️⃣ Step 5: Configure an SLA Trigger
SQL Actions can run on a schedule or when an SLA is breached.
Because this example uses a daily schedule, leave the SLA selection empty and click Finish.
GermainUX will now execute the query each day and send the resulting login report to the selected distribution list.
🛡️ Security and Performance Recommendations
|
Recommendation |
|---|
|
Use a dedicated database account with the minimum required permissions. |
|
Prefer read-only credentials for reporting queries. |
|
Store credentials in GermainUX credential configurations. |
|
Use parameterized values where supported. |
|
Avoid unrestricted or destructive SQL statements. |
|
Validate queries against a non-production database before enabling them. |
|
Apply execution limits and query timeouts. |
|
Schedule resource-intensive queries outside peak operating periods. |
|
Suppress delivery when an empty result provides no useful information. |
Component: Engine
Feature Availability: 8.6.0 or later