Load Parquet, CSV, JSON and Avro files from an Azure storage container into warehouse tables, and keep them current as new files arrive.
Azure Blob Storage is in beta. Point Contrast at a location in a container, describe the files to load, and each group of files becomes a warehouse table. Every sync loads the files that arrived since the last one.
You need the container URL, such as https://account.blob.core.windows.net/container/path. A Data Lake Storage path (abfss://container@account.dfs.core.windows.net/path) works too and is saved as its blob URL. Contrast lists and reads blobs under that path only. It never writes or deletes a blob.
Contrast can read as a service principal (recommended), with a SAS token, or with the storage account key.
In Microsoft Entra ID, register an app for Contrast and create a client secret under Certificates & secrets.
In the container's Access control (IAM), assign the app the Storage Blob Data Reader role. Assign it at the container, not the storage account or subscription, so other containers stay out of reach. Or run:
az role assignment create \
--assignee <client-id> \
--role "Storage Blob Data Reader" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container>"Paste the directory (tenant) ID and application (client) ID from the app's Overview, and the client secret's value (not its ID).
Role assignments can take a few minutes to apply.
A SAS stops working when it expires, and syncs stop with it, so prefer a service principal for a connection that keeps running. If you use a SAS, create one for the container that allows Read (r) and List (l) and nothing else. Paste the token, with or without its leading ?, or the whole SAS URL. Paste it into the SAS field, never into the container URL: Contrast refuses a container URL with a query string.
A user delegation SAS is signed with your Microsoft Entra sign-in. Azure limits it to 7 days, whatever expiry you set:
az storage container generate-sas \
--account-name <account> \
--name <container> \
--permissions rl \
--expiry <YYYY-MM-DD> \
--auth-mode login --as-userA SAS signed with the storage account key can have a later expiry. Revoking it before then means rotating the account key it was signed with:
az storage container generate-sas \
--account-name <account> \
--name <container> \
--permissions rl \
--expiry <YYYY-MM-DD> \
--account-key <account-key>When the token expires, open the source and choose Edit connection, then replace the token.
Copy key1 or key2 from the storage account's Access keys page. An account key can read and change everything in the storage account, so prefer a service principal or a SAS, and rotate the key if you use it.
You need to be a workspace administrator to start a sync. Editors can connect the container.
When you connect, Contrast checks that it can sign in, list the location and read a file. Credentials are stored encrypted and are never shown again.
A dataset is one table, files.<name>, loaded from the files its pattern matches. Start with one and add more for other file groups in the same location. The same file can belong to two datasets, and each loads it separately.
| Setting | What it does |
|---|---|
| Name | The table name: lowercase letters, digits and underscores, starting with a letter, at most 63 characters. |
| Pattern | Which files belong to the table, relative to the location. * and ? match within one folder, ** matches across folders, and {a,b} and [a-z] match a set. events/**/*.parquet matches every Parquet file at any depth under events/. |
| Format | Parquet, CSV, JSON or Avro. |
| Compression | For CSV and JSON: from the file extension (the default), none, gzip, Zstandard or bzip2. Parquet and Avro files carry their own compression. |
| CSV options | Delimiter, whether the first row holds column names, quote character, escape character (by default a doubled quote reads as one quote), null values, encoding, rows to skip before the header, and a comment character. |
| JSON layout | Detect (the default), one object per line, or one array per file. |
| Row keys | File and row number (the default) keeps every row of every file. Key columns merges rows by the columns you name, so a later row replaces an earlier one with the same key. |
| When a file has bad data | Keep the row (the default) loads the row and moves values that don't fit to _rescued_data. Skip the file stops loading a file at its first bad value and records it as failed; rows already saved from earlier parts of a large file stay in the table. Stop the sync stops the table's sync at the first bad value. |
| Lookback | How far behind the last sync a file's timestamp can be and still load: 1 to 720 hours, 168 (a week) by default. See How new files are found. |
The connect form says in plain words what each pattern matches. Contrast skips paths with a folder or file name that starts with _ or . (such as _SUCCESS, _temporary/ and .crc files), so a pattern that names one matches nothing.
Select Preview on a dataset to see what it would load before you save it. Contrast lists up to 10,000 objects under the location and reads up to 32 MB for at most 20 seconds. It samples up to 3 matching files and shows up to 20 rows. The preview shows:
_rescued_data, a Delta or Iceberg table under the location, and a note when a limit cut the preview short.A preview reads files but loads nothing and creates no table.
Select Suggest datasets on the location to have Contrast look at what is there. It groups files by their leading folders and file extension and proposes up to 50 datasets, each with a pattern and format. Keep the ones you want, change them as needed, and preview them like any other dataset.
You can change a connected container's datasets after the first save. You need to be a workspace administrator to do this. The location stays the one you connected, and every pattern is read under it. To read another location, connect it as a new source.
Every table has these columns besides the file's own:
| Column | Type | Contents |
|---|---|---|
_row_id | string | A hash of the file's key and the row number. The primary key when rows are keyed by file and row number. |
_file_path | string | The file's key in the container |
_file_row_number | long | The row's position in its file, counting from 0 |
_file_last_modified | timestamp with time zone | When the file's content was written |
_rescued_data | string | Values that didn't fit, as JSON text with the reason; null for clean rows |
A data column whose name matches one of these is renamed with a data_ prefix. Folder names in the form key=value under a dataset become string columns.
Each sync lists everything under the dataset's part of the location and loads the files it hasn't recorded yet.
_ or ..Contrast finds files by listing on each scheduled sync. It does not use event notifications.
Open a table's Files view to see each file Contrast has recorded for it, newest first. Each file has one status:
| Status | Meaning |
|---|---|
| Loaded | The file's rows were loaded. |
| Failed | The file couldn't be read. The record shows its first error. |
| Skipped | The file couldn't be read as listed: it is in an archive storage class, or it was deleted or overwritten while being read. It is read again when its contents change, and an archived file is read by the next sync after you restore it. |
| Ignored overwrite | The path had already loaded, so the new upload was not read. |
Select Failed only to show just the files that failed. A failed file is read again only when its contents change. After you fix the cause, such as the format settings, upload a corrected file to a new path.
_rescued_data with the reason, when the dataset keeps rows. Values are never truncated._rescued_data rather than widening the column. If a column can hold fractions, make sure the first file has one, or expect rescued values.Sync errors name one of these codes.
| Code | What to do |
|---|---|
object_storage_invalid_location | Enter the container URL as https://account.blob.core.windows.net/container/path, without a query string or . or .. folders. |
object_storage_invalid_credentials | The tenant ID, client ID, SAS token or account key is incomplete or malformed. Paste it again. |
object_storage_auth_failed | Azure rejected the credentials. Check the client secret or SAS hasn't expired and the account key hasn't been rotated. |
object_storage_access_denied | The error names the action that was denied, list or read. Assign Storage Blob Data Reader on the container, or create a SAS with Read and List. |
object_storage_bucket_not_found | Check the storage account and container names. |
object_storage_object_archived | The blob is in the Archive tier. Rehydrate it to the Hot or Cool tier; the next sync loads it. |
object_storage_object_gone | The file was deleted between listing and reading. It is recorded as skipped and the table carries on. |
object_storage_object_changed | The file was overwritten while it was read. If no rows from it were saved yet, it is recorded as skipped; otherwise it is recorded as failed and the rows already saved from it stay. |
object_storage_resync_kept_rows | A full resync couldn't read every file (one was archived, failed, or changed while it was read), so it removed no rows. Fix or restore the file, then run the full resync again to drop the rows of deleted files. |
object_storage_throttled | The provider limited request rates. The sync retries. |
object_storage_unavailable | The provider timed out or returned a server error. The sync retries. |
object_storage_too_many_columns | The dataset's files, or a new file joining it, would give the table more than 1,000 columns. A new table isn't created and a new file is recorded as failed (or stops the sync, if the dataset stops on bad data). Narrow the pattern to files with fewer columns, or split the files into datasets with their own patterns. |
object_storage_identity_columns_missing | The dataset's key columns aren't in its files, so the table can't sync yet. Check the key column names against the preview's columns, add a file that has them, or key rows by file and row number. |
object_storage_rows_rescued | Values didn't fit the table's columns in a dataset that skips the file or stops the sync on bad data. With Skip the file the file is recorded as failed; with Stop the sync the sync stops. Fix the values and upload the file to a new path, or switch the dataset to Keep the row to load such rows with the values in _rescued_data. |
object_storage_key_missing | Shown on a loaded file's record: some rows had no value for a key column and weren't loaded. The file's other rows loaded. Fill in the key values and upload the file to a new path, or choose key columns every row has. |
object_storage_file_invalid | The file can't be parsed as the dataset's format. Check the format, compression and CSV or JSON options, or fix the file and upload it to a new path. |
object_storage_reader_memory_exceeded, object_storage_reader_timeout, object_storage_reader_crashed | Contrast reads each file in an isolated process with a memory and time limit. A timeout or crash is tried again; after three failures in a row at the same place the file is recorded as failed. Split very large files, row groups or lines, then upload them to a new path. |
See Microsoft's documentation on assigning a role for blob data and SAS tokens.