How Bots Work

Alation Cloud Service Applies to Alation Cloud Service instances of Alation

Customer Managed Applies to customer-managed instances of Alation

A Bot is an automation that monitors the catalog content and triggers notifications, assigns tasks or takes other actions.

The architecture is illustrated below. On the left is Alation Services Manager, the engine which provides the foundational components for services like Bots including UI, scheduling, and containerization. On the right are the Alation components that Bots interact with: The main application, and Alation Analytics (cloud and on-premises).

../../../_images/FDEbotsArch.png

The content that a Bot monitors is configurable using simple rules, and Bots are described in the Alation catalog using Policy Center policies making them transparent and easy to manage. Each Bot monitors one policy and can contain multiple rules.

An example Bot policy:

../../../_images/FDEbotsPolicy.png

Bots are composed of two main components:

  1. The Bot framework - Bots are developed using Python and use a Docker containerized environment provided by the Alation Services Manager (ASM).

  2. Bot Configuration - A Bot’s configuration containing the rules and actions that allow the user to configure and manage Bots.

To read content from the catalog and take action, Bots work in conjunction with Alation Analytics (AAv2) and Alation APIs respectively. A Bot’s activity is defined using a Bot Rule which achieves three things:

  1. AAv2 is queried to monitor and check catalog content. This is achieved by running SQL select statements against AAv2 to obtain the required information. Example: For a data source ownership Bot, the query would select a list of all data sources and associated attributes.

  2. The result of the query is then evaluated against the conditions in the Bot Rules. Rules can be complex - up to 4 Bot rules per configuration can be used. The rules specify which fields to check, what the check(s) are, and what action to take.

  3. The Alation APIs are used to trigger an action if conditions are met. Actions might include notify a catalog user in a conversation, or attach a policy to a catalog asset, for example.

A properly configured Bot has 1) an Alation Analytics sql query, 2) the rule(s), and 3) the action. When the Rule’s conditions is met, the action is triggered.

Here are two example use cases that can be configured as Bots:

  • Condition - “Find all tables in Alation that do not have a description”

    • Action - “Notify the data steward of this situation so they can resolve it”

  • Condition - “Check if a column is marked as PII”

    • Action - “Attach the PII Policy to the column if not already attached”