> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Run the Exasol Connector Externally

> Use YAML to ingest metadata from Exasol databases including tables, indexes, and analytical structures.

![Exasol](https://docs.open-metadata.org/public/images/connectors/exasol.webp)

# Exasol

PROD

In this section, we provide guides and references to use the Exasol connector.

Configure and schedule Exasol metadata and profiler workflows from the OpenMetadata UI:

* [Requirements](#requirements)
* [Metadata Ingestion](#metadata-ingestion)
* [Lineage](#lineage)
* [Query Usage](#query-usage)

## How to Run the Connector Externally

To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with
custom Airflow plugins to handle the workflow deployment.

If, instead, you want to manage your workflows externally on your preferred orchestrator, you can check
the following docs to run the Ingestion Framework **anywhere**.

> [card] [External Schedulers](https://docs.open-metadata.org/v2.1.x/deployment/ingestion.md)
>
> Get more information about running the Ingestion Framework Externally

## Requirements

### Python Requirements

Use Python 3.10 or later. Python 3.12 is recommended, because it is what the OpenMetadata 2.0 ingestion images use. To confirm the supported range for your release, check the `Requires-Python` metadata of that release’s `openmetadata-ingestion` package.

To run the Exasol ingestion, you will need to install:

```bash theme={null}
pip3 install "openmetadata-ingestion[exasol]"
```

### Database Privilege Requirements

For the required database privileges, see the [Requirements section of the Exasol connector documentation](https://docs.open-metadata.org/v2.1.x/connectors/database/exasol.md#requirements).

## Metadata Ingestion

The Exasol service connection is defined by the [Exasol connection JSON schema](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/exasolConnection.json).

To create and run a Metadata Ingestion workflow, define a YAML configuration that connects to Exasol, processes the required entities, and sends the metadata to OpenMetadata. The workflow configuration follows the [metadata ingestion workflow JSON schema](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/workflow.json).

### 1. Define the YAML Config

#### Source Configuration

Configure the source type and service name for your Exasol connector.

#### Username

**username**: The username required to authenticate and connect to the Exasol database. The user must have sufficient privileges to access and read all the metadata available in Exasol.

#### Password

**password**: The password associated with the user account used to connect to the Exasol database. Ensure this password corresponds to the specified username and is stored securely. Avoid sharing passwords in plain text and use secure methods for managing sensitive credentials.

#### Host Port

**hostPort**: Provide the fully qualified hostname and port number of your Exasol deployment in the "Host and Port" field.

#### SSL/TLS Settings

**SSL/TLS Settings**: Mode/setting for SSL validation:

* **validate-certificate**: Uses Transport Layer Security (TLS) and validates the server certificate using system certificate stores.
* **ignore-certificate**: Uses Transport Layer Security (TLS) but disables the validation of the server certificate. This mode should **never** be used in production. It is useful for testing with self-signed certificates.
* **disable-tls**: Does not use any Transport Layer Security (TLS). Data will be sent in plain text (no encryption). This mode should **never** be used in production and should only be used in debugging scenarios.

#### Connection Options

**Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to database during the connection. These details must be added as Key-Value pairs.

#### Connection Arguments

**Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to database during the connection. These details must be added as Key-Value pairs.

#### Source Config

The `sourceConfig` is defined [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/databaseServiceMetadataPipeline.json):

* **markDeletedTables**: To flag tables as soft-deleted if they are not present anymore in the source system.
* **markDeletedStoredProcedures**: Optional configuration to soft delete stored procedures in OpenMetadata if the source stored procedures are deleted. Also, if the stored procedure is deleted, all the associated entities like lineage, etc., with that stored procedure will be deleted.
* **markDeletedSchemas**: Optional configuration to soft delete schemas stored in OpenMetadata if the source schema is deleted. Setting this flag to true will only keep filtered schemas and delete any other schemas that do not match schemaFilterPattern or do not exist at source.
* **markDeletedDatabases**: Additional optional configuration for soft deletion, providing a granular option to select which particular entities should be deleted.
* **includeTables**: Set to `true` or `false` to ingest table data. Default is `true`.
* **includeViews**: Set to `true` or `false` to ingest view definitions.
* **includeTags**: Optional configuration to toggle the tags ingestion.
* **includeOwners**: Set the **Include Owners** toggle to control whether to include owners to the ingested entity if the owner email matches with a user stored in the OM server as part of metadata ingestion. If the ingested entity already exists and has an owner, the owner will not be overwritten.
* **ownerConfig**: Advanced, hierarchical configuration for assigning owners to databases, schemas, and tables during ingestion, with per-entity mappings and inheritance. For more information, see [Hierarchical Owner Configuration](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/hierarchical-owner-configuration).
* **includeStoredProcedures**: Optional configuration to toggle the Stored Procedures ingestion.
* **includeDDL**: Optional configuration to toggle the DDL Statements ingestion.
* **overrideMetadata** *(boolean)*: Set the **Override Metadata** toggle to control whether to override the existing metadata in the OpenMetadata server with the metadata fetched from the source. If the toggle is set to true, the metadata fetched from the source will override the existing metadata in the OpenMetadata server. If the toggle is set to false, the metadata fetched from the source will not override the existing metadata in the OpenMetadata server. This is applicable for fields like description, tags, owner, and displayName.
* **queryLogDuration**: Configuration to tune how far we want to look back in query logs to process Stored Procedures results.
* **queryParsingTimeoutLimit**: Configuration to set the timeout for parsing the query in seconds.
* **useFqnForFiltering**: Regex will be applied on the fully qualified name (for example, `service_name.db_name.schema_name.table_name`) instead of the raw name (for example, `table_name`).
* **databaseFilterPattern**, **schemaFilterPattern**: Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).
* **threads (beta)**: The number of threads to use when extracting the metadata using multithreading.
* **databaseMetadataConfigType** *(string)*: Database Source Config Metadata Pipeline type.
* **incremental (beta)**: Incremental Extraction configuration. Currently implemented for [BigQuery](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/incremental-extraction/bigquery), [Redshift](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/incremental-extraction/redshift), and [Snowflake](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/incremental-extraction/snowflake).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

exasol\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: exasol
  serviceName: "local_exasol"
  serviceConnection:
    config:
      type: Exasol
      username: username # REQUIRED
      password: password # REQUIRED
      hostPort: 127.0.0.1:8563  # REQUIRED - format: host:port
      SSL/TLS Settings: validate-certificate
      # connectionOptions:
      #   key: value
      # connectionArguments:
      #   key: value
```

```yaml theme={null}
  sourceConfig:
    config:
      type: DatabaseMetadata
      markDeletedTables: true
      markDeletedStoredProcedures: true
      markDeletedSchemas: true
      markDeletedDatabases: true
      includeTables: true
      includeViews: true
      # includeTags: true
      # includeOwners: false
      # ownerConfig:
      #   default: data-platform-team
      #   database:
      #     database1: owner1
      #   databaseSchema:
      #     database1.schema1: owner1
      #   table:
      #     database1.schema1.table1: owner1
      #   enableInheritance: true
      # includeStoredProcedures: true
      # includeDDL: true
      # overrideMetadata: false
      # queryLogDuration: 1
      # queryParsingTimeoutLimit: 300
      # useFqnForFiltering: false
      # threads: 1
      # databaseMetadataConfigType: ()
      # incremental:
      #   enabled: true
      #   lookbackDays: 7
      #   safetyMarginDays: 1
      # databaseFilterPattern:
      #   includes:
      #     - database1
      #     - database2
      #   excludes:
      #     - database3
      #     - database4
      # schemaFilterPattern:
      #   includes:
      #     - schema1
      #     - schema2
      #   excludes:
      #     - schema3
      #     - schema4
      # tableFilterPattern:
      #   includes:
      #     - users
      #     - type_test
      #   excludes:
      #     - table3
      #     - table4
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:

```bash theme={null}
metadata ingest -c <path-to-yaml>
```

Note that from connector to connector, this recipe will always be the same. By updating the YAML configuration,
you will be able to extract metadata from different sources.

## Lineage

After running a Metadata Ingestion workflow, we can run Lineage workflow.
While the `serviceName` will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the `serviceConnection` details from the server.

### 1. Define the YAML Config

This is a sample config for exasol Lineage:

#### Source Configuration

Configure the source type and service name for your lineage workflow.

You can find all the definitions and types for the `sourceConfig` [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/databaseServiceQueryLineagePipeline.json).

#### Lineage Config Type

**type**: Set to `DatabaseLineage` for database lineage ingestion.

#### Query Log Duration

**queryLogDuration**: Configuration to tune how far we want to look back in query logs to process lineage data in days.

#### Parsing Timeout Limit

**parsingTimeoutLimit**: Configuration to set the timeout for parsing the query in seconds.

#### Filter Condition

**filterCondition**: Condition to filter the query history.

#### Result Limit

**resultLimit**: Configuration to set the limit for query logs.

#### Query Log File Path

**queryLogFilePath**: Configuration to set the file path for query logs. If instead of getting the query logs from the database we want to pass a file with the queries.

#### Database Filter Pattern

**databaseFilterPattern**: Regex to only fetch databases that matches the pattern.

#### Schema Filter Pattern

**schemaFilterPattern**: Regex to only fetch tables or databases that matches the pattern.

#### Table Filter Pattern

**tableFilterPattern**: Regex to only fetch tables or databases that matches the pattern.

#### Override View Lineage

**overrideViewLineage**: Set the 'Override View Lineage' toggle to control whether to override the existing view lineage.

#### Process View Lineage

**processViewLineage**: Set the 'Process View Lineage' toggle to control whether to process view lineage.

#### Process Query Lineage

**processQueryLineage**: Set the 'Process Query Lineage' toggle to control whether to process query lineage.

#### Process Stored Procedure Lineage

**processStoredProcedureLineage**: Set the 'Process Stored ProcedureLog Lineage' toggle to control whether to process stored procedure lineage.

#### Threads

**threads**: Number of Threads to use in order to parallelize lineage ingestion.

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

\{connector}\_lineage.yaml
Copy full code

```yaml theme={null}
source:
  type: exasol-lineage
  serviceName: exasol
  sourceConfig:
    config:
      type: DatabaseLineage
      # Number of days to look back
      queryLogDuration: 1
      parsingTimeoutLimit: 300
      # filterCondition: query_text not ilike '--- metabase query %'
      resultLimit: 1000
      # If instead of getting the query logs from the database we want to pass a file with the queries
      # queryLogFilePath: /tmp/query_log/file_path
      # databaseFilterPattern:
      #   includes:
      #     - database1
      #     - database2
      #   excludes:
      #     - database3
      # schemaFilterPattern:
      #   includes:
      #     - schema1
      #     - schema2
      #   excludes:
      #     - schema3
      # tableFilterPattern:
      #   includes:
      #     - table1
      #     - table2
      #   excludes:
      #     - table3
      #     - table4
      overrideViewLineage: false
      processViewLineage: true
      processQueryLineage: true
      processStoredProcedureLineage: true
      threads: 1
sink:
  type: metadata-rest
  config: {}
```

* You can learn more about how to configure and run the Lineage Workflow to extract Lineage data from [here](https://docs.open-metadata.org/connectors/ingestion/workflows/lineage)

### 2. Run with the CLI

After saving the YAML config, we will run the command the same way we did for the metadata ingestion:

```bash theme={null}
metadata ingest -c <path-to-yaml>
```

## Query Usage

The Query Usage workflow will be using the `query-parser` processor.

After running a Metadata Ingestion workflow, we can run Query Usage workflow.
While the `serviceName` will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the `serviceConnection` details from the server.

### 1. Define the YAML Config

This is a sample config for exasol Usage:

#### Source Configuration

Configure the source type and service name for your usage workflow.

#### Usage Config Type

**type**: Set to `DatabaseUsage` for database usage ingestion.

#### Query Log Duration

**queryLogDuration**: Configuration to tune how far we want to look back in query logs to process usage data (in days).

#### Stage File Location

**stageFileLocation**: Temporary file name to store the query logs before processing. Absolute file path required.

Note that the location is a directory that will be cleaned at the end of the ingestion.

#### Result Limit

**resultLimit**: Configuration to set the limit for query logs.

#### Query Log File Path

**queryLogFilePath**: Configuration to set the file path for query logs. If instead of getting the query logs from the database we want to pass a file with the queries.

#### Processor Configuration

Choose the `query-parser` processor to parse and process the query logs.

#### Stage Configuration

Configure the staging location for table usage data before it's sent to OpenMetadata.

#### Bulk Sink Configuration

Configure the bulk sink for metadata usage ingestion.

\{connector}\_usage.yaml
Copy full code

```yaml theme={null}
source:
  type: exasol-usage
  serviceName: exasol
  sourceConfig:
    config:
      type: DatabaseUsage
      # Number of days to look back
      queryLogDuration: 7
      # This is a directory that will be DELETED after the usage runs
      stageFileLocation: <path to store the stage file>
      # resultLimit: 1000
      # If instead of getting the query logs from the database we want to pass a file with the queries
      # queryLogFilePath: path-to-file
processor:
  type: query-parser
  config: {}
stage:
  type: table-usage
  config:
    filename: /tmp/exasol_usage
bulkSink:
  type: metadata-usage
  config:
    filename: /tmp/exasol_usage
```

### 2. Run with the CLI

After saving the YAML config, we will run the command the same way we did for the metadata ingestion:

```bash theme={null}
metadata usage -c <path-to-yaml>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.