# Process Mining-specific configuration

> Reference for Process Mining-specific configuration options in Automation Suite, including secondary SQL server data warehouse settings.

If you enable Process Mining, we recommend specifying a secondary SQL server to act as a data warehouse that is separate from the primary Automation Suite SQL Server. The data warehouse SQL Server will be under heavy load and can be configured in the `processmining` section:

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Parameter  
     Description  
  
 
 
  
    <code>sql_connection_str</code> 
    DotNet formatted connection string with database set as a placeholder: <code>Initial Catalog=DB_NAME_PLACEHOLDER</code>. 
  
  
    <code>airflow.metadata_db_connection_str</code> 
   
  
    This applies to the PostgreSQL <code>AutomationSuite Airflow</code> database.
  

  
    Sqlalchemy PSYCOPG2 formatted connection string for custom Airflow metadata database location:
    <code>PostgreSQL:5432/DB_NAME_PLACEHOLDER</code>.
  

  Example:

  <pre><code>postgresql+psycopg2://testadmin:&lt;password&gt;@postgres.company.com:5432/DB_NAME_PLACEHOLDER</code></pre>

  
    You can also use the <code>metadata_db_connection_str</code> in the
    processmining section at the global level in the
    <code>cluster_config.json</code> to provide the value for the Airflow metadatabase.
    In this case, <code>airflow.metadata_db_connection_str</code> is optional.
  

  <pre><code>{
  "processmining": {
    "enabled": true,
    "app_security_mode": "system_managed",
    "airflow": {
      "metadata_db_connection_str": "postgresql+psycopg2://testadmin:&lt;password&gt;@sfdev8454496-postgresql.postgres.database.azure.com:5432/AutomationSuite_Airflow"
    }
  }
}</code></pre>

  
  
    <code>warehouse.sql_connection_str</code> 
     DotNet formatted SQL connection string to the processmining data warehouse SQL Server with placeholder for dbname: <code>Initial Catalog=DB_NAME_PLACEHOLDER</code>. 
  
  
    <code>warehouse.sqlalchemy_pyodbc_sql_connection_str</code> 
     Sqlalchemy PYODBC formatted SQL connection string to the processmining data warehouse SQL Server with placeholder for dbname: <code>sqlServer:1433/DB_NAME_PLACEHOLDER</code>. 
  
  
    <code>warehouse.master_sql_connection_str</code> 
    If the installer is creating databases through <code>sql.create_db: true</code> setting, a DotNet formatted master SQL connection string must be provided for the processmining data warehouse SQL Server. Database in the connection string must be set as <code>master</code>. 
  
 

Sample Process Mining connection string with PostgreSQL for `AutomationSuite_Airflow`

```
"processmining": {
    "enabled": true,
    "app_security_mode": "system_managed",
    "airflow": {
      "metadata_db_connection_str": "postgresql+psycopg2://testadmin:<password>@sfdev8454496-postgresql.postgres.database.azure.com:5432/AutomationSuite_Airflow"
    },
    "warehouse": {
      "sql_connection_str": "Server=tcp:kerberossql.autosuitead.local,1433;Initial Catalog=AutomationSuite_Warehouse;Persist Security Info=False;User Id=testadmin;Password='<password>';MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;Max Pool Size=100;",
      "sqlalchemy_pyodbc_sql_connection_str": "mssql+pyodbc://testadmin:<password>@kerberossql.autosuitead.local:1433/AutomationSuite_Warehouse?driver=ODBC+Driver+17+for+SQL+Server&TrustServerCertificate=YES&Encrypt=YES",
      "master_sql_connection_str": "Server=tcp:kerberossql.autosuitead.local,1433;Initial Catalog=master;Persist Security Info=False;User Id=testadmin;Password='<password>';MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;Max Pool Size=100;"
```

:::note
When using Kerberos authentication, utilize the `Integrated Security` and `Trusted_Connection` parameters. By setting `Integrated Security` to `true` and setting `Trusted_Connection` to `yes`, the credentials of the currently logged in user are used for the connection. In this case, you do not need to specify a separate username and password.
:::
:::note
When configuring the connection strings for the Process Mining data warehouse SQL Server, the named instance of the SQL Server should be omitted. 

Named instances of SQL Server cannot operate on the same TCP port. Therefore, the port number alone is sufficient to distinguish between instances. 

For example, use `tcp:server,1445` instead of `tcp:server\namedinstance,1445`.
:::

:::important
Note that the names for template PYODBC connection string `postgresql_connection_string_template_sqlalchemy_pyodbc` (for PostgreSQL) and the PYODBC connection string `sqlalchemy_pyodbc_sql_connection_str` used when you bring your own database are different. Also connection string names are different for the template SQL `sql_connection_string_template` and `sql_connection_str` used when you bring your own database.
:::

:::important
If you bring your own database and you configured this using the `sql_connection_str` and `sqlalchemy_pyodbc_sql_connection_str` or `airflow.metadata_db_connection_str` connection strings in the `processmining` section of the `cluster_config.json`file, the template connection strings `sql_connection_string_template` and `postgresql_connection_string_template_sqlalchemy_pyodbc` (for PostgreSQL) are ignored if specified.
:::
