Skip to main content

Mine query history

Mining query history from Microsoft SQL Server generates lineage relationships between your database assets by analyzing historical SQL queries. This enables you to understand how data flows through your SQL Server databases and how tables, views, and stored procedures connect to each other.

Prerequisites

Before you begin, make sure you have:

Create miner workflow

  1. In the top right of any screen, navigate to New and then click New Workflow.
  2. From the filters along the top, click Miner.
  3. From the list of packages, select the miner for Microsoft SQL Server and click Setup Workflow.

Configure miner

  1. For Connection, select the connection to mine. To select a connection, the crawler must have already run.
  2. For Miner extraction method, select S3.
  3. Enter the details for your files:
    • For Bucket Name, enter the name of your S3 bucket (including s3://).
    • For Bucket Prefix, enter the S3 prefix (directory) where the files are located.
    • For Bucket Region, enter the S3 region name if applicable.
    • For SQL Json key, enter the JSON key that contains the SQL query value (for example, QUERY_TEXT).
    • For Default Database Json Key, enter the JSON key that contains the default database name (for example, DATABASE_NAME).
    • For Default Schema Json Key, enter the JSON key that contains the default schema name (for example, SCHEMA_NAME).
    • For Session ID Json Key, enter the JSON key that contains the session identifier (for example, SESSION_ID).
  4. If Atlan support has provided a custom control configuration, select Custom under Control Config and enter the configuration in Custom Config. You can also enter { "ignore-all-case": true } to enable crawling assets with case-sensitive identifiers.

Run miner

  • To run once immediately, click Run at the bottom of the screen.
  • To schedule recurring runs (hourly, daily, weekly, or monthly), click Schedule & Run.

See also