Click on Create New Item to be guided through each step you need to create a new rule, such as selecting your data platform, entering your query, and adding custom fields and communication rules.
Select the project that will contain this rule.
On this page, click on Create New Item. You will be directed to a wizard that will guide you through all the steps you need to create an alert, reference or glossary.
Complete the following sections whether you are creating an alert, reference or glossary rule type. We have chosen an alert for this example but these steps apply to all rule types.
The first step in creating a rule, no matter the type, is providing a name for the rule. Rule names should be user friendly, unique, and are summaries of the purpose of the rule.
You also have the option to add a description for this rule. Here you can describe the rule and its purpose in more detail. This will display in card and list view of your project.
Then select an agent that will execute this rule. An agent contains all the code that allows rules to run.
If you have chosen to create a glossary or reference, you will then need to choose whether this rule will obtain its data from a source or if you will manually enter data. You can also choose to select to use both source and manually added data.
Continue following this guide if you are creating a rule that only uses source data. If you have chosen to create a manual rule follow the guide in this link.
Please note that you cannot change the data source type after you have created and run this rule.
Rules consist of two connections; the source connection and the output connection.
First select the source connection, your rule’s query will be retrieving data from this connection.
Then select the output connection and a dedicated schema will be created in this database connection.
If you would like to use a new connection, you can also choose to create a source or output connection here using the Add button beside the connection dropdown fields on this page.
(If you have already chosen your connections, skip ahead to add your query.)
Choose the connection type you would like to add.
Provide the details you need to connect to your data platform.
This will add a connection and you will be able to select it in the dropdown.
To learn more about connections and their requirements please read our guide here.
Provide a query here that will select the records from your data source for this rule.
This query should be written using the same SQL variant that your source connection utilizes. Loome Monitor will validate the query as you type and provide any errors or warnings below the query box.
Loome Monitor supports pasting in a query that was written using an external tool such as SQL Server Management Studio or Snowflake Worksheets.
In this next window, select one or more Key Columns for your rule.
Examples of key columns are unique identifiers such as primary keys or a combination of columns to form a composite key. In the event of Key Columns not being entirely unique, Loome Monitor will not behave as expected.
In order to create a rule that will persistently stage your data and perform communication steps accordingly, you will need to choose at least one unique key column and also leave at least one column unselected.
In the example below, you will see that I can select one of the columns available from my query in my data source.
Please note that rules that use a SQL connection as a target connection will use clustered indexes. If you choose any individual key column size that exceeds 900 bytes or if the sum of all key column sizes exceed 2600 bytes, you will need to confirm your key column selection as these columns can cause your data to be truncated.
If you change your selected key column after you have run a rule, any existing data in this rule will be archived when the rule is next run. Archived tables will include the date it was archived in the table name. The newly created tables will continue to be created using the project ID and rule ID as its name.
In this next window you can choose to populate the ‘Assigned To’ field from your own data, rather than manually completing this field after your results have been created. This is optional and you can choose to skip this step.
All columns in your data source will be available to choose from.
In order to populate the Assigned to fields with users, this column must contain values in an email format.
Choose an existing column from your data source that contains the email addresses you would like to assign to each record and click Next.
Or you may leave it blank and continue Next without choosing a column. You can later assign users in the results table.
If you have already added a user to an assigned to field, this user will not be replaced with the value in your selected column. The values in your selected column will only populate empty fields.
If you would like to notify these assigned users of any results, add a communication rule by following the next step and select Assigned to as the Recipient Column.
You can choose to create custom fields in the last step of creating a rule. (This is not a requirement and you have the choice to proceed without adding any custom fields.)
A custom field is used to capture feedback for your results. Loome will create a dedicated schema for your custom field metadata and it will be independent from the results table generated from this rule. Feedback can be captured from users that have been notified about unresolved results.
Click on Add Custom Field and a slide-out will be expanded with the option to choose from eight different field types.
|Date||This will add a field where users can select a date for each row.|
|Number||Users can attribute a number to each row.|
|Users can attach an email to a record.|
|URL||Users can add a related URL to this result.|
|Notes||Users can add notes to rows to capture feedback, add additional information, or provide definitions for terms. You can add up to 4000 characters to each note.|
|List||Add this custom field when you would like to provide the options that a user can select from when they are providing feedback for a result.|
|String||This will create a field where you can provide up to 255 characters.|
|Boolean||When added, you can choose between ‘True’ and ‘False’ for each row in your results.|
|Decimal||You can specify the scale and precision for number columns such as money or percentage. It will have a default of 12 for precision and 2 for scale.|
You can view an example of each of these custom fields used in a results table here.
If you have edited a custom field that is used in a communication rule, please check its recipient column to ensure that your communication rule runs successfully.
Please also note that support for renaming a column is not available in Azure Synapse Analytics GA as of February 2021. Thus renaming an existing custom field column may not work when using Azure Synapse Analytics as a target connection.
Please note that you cannot create a custom field with the same name as a source data column.
To delete a custom field, click on Update Custom Field.
This will expand a slideout, click on delete in the top right corner.
You will not be able to delete a custom field if it is used in a communication rule. Change the custom field used in that communication rule to another column in order to delete this custom field.
In rules that use source data, you can optionally choose a boolean or bit type column that is available in your source data query to indicate whether a record’s custom fields can be edited.
It will lock rows with a true value within your rule and prevent the editing of their custom fields.
If you have not provided a bit or boolean column in your source query, this will not be available and you will not be able to configure any columns as a lockout column.
After you have supplied a boolean or bit type column in the source query, you can then choose a column to configure it as the lockout column.
When a row has a true value in this column, the custom fields of that row cannot be edited. If it is a false value, the custom fields can be edited. You can view this in the results table after you have run the rule.
You may skip this step and leave it unselected if you do not wish to lockout any custom fields.
Click on Create to save and complete this rule.
You will be shown a page where you have the option to either return to your project, edit, or run this rule.
Run this rule to view the results it will generate.
Once you click on Run, you will be able to see the progress of this rule as each step is listed under ‘Execution Steps’.
If the rule execution failed, you can also see which steps have failed in this log. You will also be able to see an error log under the title at the top.
Once you have run this rule, you will have your results ready and you can choose to add communication steps by clicking on edit on this page or by editing the rule after you have viewed your results.
Click on the Results button, which is the table icon in the top-right of these execution steps, to be directed to your Results page.
You can also run this rule from the slide-out when editing a rule, and on the page of the rule’s project using the Run button at the bottom corner of each rule card.