Skip to content

Scanner for AzureSQL

You can scan metadata from AzureSQL with depot/non-depot Scanner workflows. In this document, find requirements and YAML configurations to connect to AzureSQL for extracting entity metadata.

Requirements

To scan metadata from AzureSQL, you need the following:

  1. Ensure that you have added your current IP address on Azure SQL firewall rules. Checkout this document on how to whitelist your IP using azure portal.
  2. AzureSQL database user must grant SELECT privilege to fetch the metadata of tables and views.

Depot Scan Workflow

DataOS allows you to connect to AzureSQL database using Depot. The Depot enables access to all schemas visible to the specified user in the configured database.

Scanner YAML

version: v1
name: azuresql-scanner2
type: workflow
tags:
  - azuresql-scanner2.0
description: Scanner workflow to scan schema tables and register metadata in Metis DB
workflow:
  dag:
    - name: scanner2-azuresql
      description: The job scans schema from azuresql depot tables and register metadata to metis2
      spec:
        stack: scanner:2.0
        compute: runnable-default
        runAsUser: metis
        stackSpec:
          depot: azuresql
          sourceConfig:                 # Apply filter as per requirement
            config:
              databaseFilterPattern:
                includes:
                  - <databasename> 
                excludes:
                  - <databasename> 
              schemaFilterPattern:
                includes:
                  - <schemaname>
                excludes:
                  - <schemaname>
              tableFilterPattern:
                includes:
                  - <schemaname>
                excludes:
                  - <schemaname>