Create a Data Source
For a complete list of supported databases, see the Immuta Support Matrix.
Requirements
- CREATE_DATA_SOURCEImmuta permission
- The Snowflake user registering data sources must have the following privileges on all securables: - USAGEon all databases and schemas with registered data sources.
- REFERENCESon all tables and views registered in Immuta.
- . 
 
Snowflake imported databases
Immuta does not support Snowflake tables from imported databases. Instead, create a view of the table and register that view as a data source.
- Databricks Spark integration requirements: Ensure that at least one of the traits below is true. - The user exposing the tables has READ_METADATA and SELECT permissions on the target views/tables (specifically if Table ACLs are enabled). 
- The user exposing the tables is listed in the - immuta.spark.acl.whitelistconfiguration on the target cluster.
- The user exposing the tables is a Databricks workspace administrator. 
 
- Databricks Unity Catalog integration requirements: When registering Databricks Unity Catalog securables in Immuta, use the service principal from the integration configuration and ensure it has the privileges listed below. Immuta uses this service principal continuously to orchestrate Unity Catalog policies and maintain state between Immuta and Databricks. - USE CATALOGand- MANAGEon all catalogs containing securables registered as Immuta data sources.
- USE SCHEMAon all schemas containing securables registered as Immuta data sources.
- MODIFYand- SELECTon all securables you want registered as Immuta data sources.
 
Enter connection information
- Navigate to the My Data Sources page. 
- Click the New Data Source button in the top right corner. 
- Select the data platform containing the data you wish to expose by clicking a tile. 
- Input the connection parameters to the database you're exposing. Click the tabs below for guidance for select data platforms. 
See the Create an Amazon S3 data source guide for instructions.
See the Create a Google BigQuery data source guide for instructions.
Azure Databricks Unity Catalog limitation
Set all table-level ownership on your Unity Catalog data sources to an individual user or service principal instead of a Databricks group before proceeding. Otherwise, Immuta cannot apply data policies to the table in Unity Catalog. See the Azure Databricks Unity Catalog limitation for details.
- Complete the first four fields in the Connection Information box: - Server: hostname or IP address 
- Port: port configured for Databricks, typically port 443 
- SSL: when enabled, ensures communication between Immuta and the remote database is encrypted 
- Database: the remote database 
 
- Select your authentication method from the dropdown: - Access Token: - Enter your Databricks API Token. Use a non-expiring token so that access to the data source is not lost unexpectedly. 
- Enter the HTTP Path of your Databricks cluster or SQL warehouse. 
 
- OAuth machine-to-machine (M2M): - Enter the HTTP Path of your Databricks cluster or SQL warehouse. 
- Fill out the Token Endpoint with the full URL of the identity provider. This is where the generated token is sent. The default value is - https://<your workspace name>.cloud.databricks.com/oidc/v1/token
- Fill out the Client ID. This is a combination of letters, numbers, or symbols, used as a public identifier and is the same as the service principal's application ID. 
- Enter the Scope (string). The scope limits the operations and roles allowed in Databricks by the access token. See the OAuth 2.0 documentation for details about scopes. 
- Enter the Client Secret. Immuta uses this secret to authenticate with the authorization server when it requests a token. 
 
 
- Enter the HTTP Path of your Databricks cluster or SQL warehouse. 
- If you are using a proxy server with Databricks, specify it in the Additional Connection String Options: - UseProxy=1;ProxyHost=my.host.com;ProxyPort=6789
- Click the Test Connection button. 
Select virtual population
- Decide how to virtually populate the data source by selecting Create sources for all tables in this database and monitor for changes or Schema/Table. 
- Complete the workflow for Create sources for all tables in this database and monitor for changes or Schema/Table selection, which are outlined on the tabs below: 
Create sources for all tables in this database and monitor for changes
Selecting this option will create and keep in sync all data sources within this database. New schemas will be automatically detected and the corresponding data sources and schema projects will be created.
Schema/Table
Selecting this option will create and keep in sync all tables within the schema(s) selected. No new schemas will be detected.
- If you choose Schema/Table, click Edit in the table selection box that appears. 
- By default, all schemas and tables are selected. Select and deselect by clicking the checkbox to the left of the name in the Import Schemas/Tables menu. You can create multiple data sources at one time by selecting an entire schema or multiple tables. 
- After making your selection(s), click Apply. 
Enter basic information
Provide information about your source to make it discoverable to users.
- Enter the SQL Schema Name Format to be the SQL name that the data source exists under in the Immuta Query Engine. It must include a schema macro but you may personalize it using lowercase letters, numbers, and underscores to personalize the format. It may have up to 255 characters. 
- Enter the Schema Project Name Format to be the name of the schema project in the Immuta UI. If you enter a name that already exists, the name will automatically be incremented. For example, if the schema project - Customer tablealready exists and you enter that name in this field, the name for this second schema project will automatically become- Customer table 2when you create it.- When selecting Create sources for all tables in this database and monitor for changes you may personalize this field as you wish, but it must include a schema macro. 
- When selecting Schema/Table this field is prepopulated with the recommended project name and you can edit freely. 
 
- Select the Data Source Name Format, which will be the format of the name of the data source in the Immuta UI. 
<Tablename>
The data source name will be the name of the remote table, and the case of the data source name will match the case of the macro.
<Schema><Tablename>
The data source name will be the name of the remote schema followed by the name of the remote table, and the case of the data source name will match the cases of the macros.
Custom
Enter a custom template for the Data Source Name. You may personalize this field as you wish, but it must include a tablename macro. The case of the macro will apply to the data source name (i.e., <Tablename> will result in "Data Source Name," <tablename> will result in "data source name," and <TABLENAME> will result in "DATA SOURCE NAME").
- Enter the SQL Table Name Format, which will be the format of the name of the table in Immuta. It must include a table name macro, but you may personalize the format using lowercase letters, numbers, and underscores. It may have up to 255 characters. 
Enable or disable schema monitoring
When selecting the Schema/Table option you can opt to enable Schema Monitoring by selecting the checkbox in this section.
Note: This step will only appear if all tables within a server have been selected for creation.
Create a schema detection job in Databricks
In most cases, Immuta’s schema detection job runs automatically from the Immuta web service. For Databricks, that automatic job is disabled because of the ephemeral nature of Databricks clusters. In this case, Immuta requires users to download a schema detection job template (a Python script) and import that into their Databricks workspace.
- Enable Schema Monitoring or Detect Column Changes on the Data Source creation page. 
- Click Download Schema Job Detection Template. 
- Click the Click Here To Download text. 
- Before you can run the script, follow the Databricks documentation to create the scope and secret using the Immuta API Key generated on your user profile page. 
- Import the Python script you downloaded into a Databricks workspace as a notebook. Note: The job template has commented out lines for specifying a particular database or table. With those two lines commented out, the schema detection job will run against ALL databases and tables in Databricks. Additionally, if you need to add proxy configuration to the job template, the template uses the Python requests library, which has a simple mechanism for configuring proxies for a request. 
- Schedule the script as part of a notebook job to run as often as required. Each time the job runs, it will make an API call to Immuta to trigger schema detection queries, and these queries will run on the cluster from which the request was made. Note: Use the - api_immutacluster for this job. The job in Databricks must use an Existing All-Purpose Cluster so that Immuta can connect to it over ODBC. Job clusters do not support ODBC connections.
Create the data source
Opt to configure settings in the Advanced Options section (outlined below), and then click Create to save the data source(s).
Advanced options
None of the following options are required. However, completing these steps will help maximize the utility of your data source.
Column Detection
This setting monitors when remote tables' columns have been changed, updates the corresponding data sources in Immuta, and notifies Data Owners of these changes.
To enable, select the checkbox in this section.
See Schema Projects Overview to learn more about Column Detection.
Event Time
An Event Time column denotes the time associated with records returned from this data source. For example, if your data source contains news articles, the time that the article was published would be an appropriate Event Time column.
- Click the Edit button in the Event Time section. 
- Select the column(s). 
- Click Apply. 
Selecting an Event Time column will enable
- more statistics to be calculated for this data source including the most recent record time, which is used for determining the freshness of the data source. 
- the creation of time-based restrictions in the Policy Builder. 
Latency
- Click Edit in the Latency section. 
- Complete the Set Time field, and then select MINUTES, HOURS, or DAYS from the subsequent dropdown menu. 
- Click Apply. 
This setting impacts the following behaviors:
- How long Immuta waits to refresh data that is in cache by querying the data source. For example, if you only load data once a day in the remote platform, this setting should be greater than 24 hours. If data is constantly loaded in the remote platform, you need to decide how much data latency is tolerable vs how much load you want on your data source; however this is only relevant to Immuta S3, since SQL will always interactively query the remote database. 
- How often Immuta checks for new values in a column that is driving row-level redaction policies. For example, if you are redacting rows based on a country column in the data, and you add a new country, it will not be seen by the Immuta policy until this period expires. 
Sensitive Data Discovery
Data Owners can disable Sensitive Data Discovery for their data sources in this section.
- Click Edit in this section. 
- Select Enabled or Disabled in the window that appears, and then click Apply. 
Last updated
Was this helpful?

