Databricks Writer operational considerations
This section covers best practices, runtime behavior in specific and edge-case scenarios, observability, and troubleshooting for Databricks Writer.
Best-practice recommendations
Common (all clouds)
Use a connection profile for authentication. A connection profile lets you update credentials, including rotating a Service Principal's Client Secret, without editing every application that uses them, and without stopping and restarting each application individually the way inline credentials require.
Retrieve secrets from a vault rather than embedding them inline. Client Secret, Client ID, GCS Service Account Key, and Storage Credential Name can all be sourced from an external vault rather than specified as plain values in your application.
Partition your target tables when using Merge mode. Since Delta Lake tables don't have primary keys, Merge mode relies on scanning to match rows; partitioning significantly reduces the need for full-table scans and improves performance. You cannot partition an existing table after the fact, so decide on partitioning before creating target tables.
Avoid Databricks File System (DBFS) as a staging area for production or sensitive data, on any cloud. Use S3, ADLS Gen2, or GCS instead, as appropriate to your cloud platform.
Do not configure new personal staging locations. This feature has been deprecated by Databricks (and, for Azure, by Microsoft) — use S3, ADLS Gen2, or GCS staging instead.
Databricks on Google Cloud–specific
Use a Connection Profile for GCS staging as well as authentication. A GCS Connection Profile lets you rotate a GCS service account key without editing or restarting every application that uses it.
Place your GCS bucket in the same region as your Databricks workspace. This avoids egress charges. A bucket in a different region will still work, but at additional cost.
Runtime Considerations
Authentication and Permission Loss During Runtime
Databricks Writer halts the application, rather than silently failing or dropping data, when authentication or permissions are lost while an application is running. This is verified behavior for each of the following scenarios:
The Client ID no longer corresponds to a valid Service Principal (for example, the Service Principal was deleted from Databricks).
The Client Secret is rotated or invalidated (the halt occurs at the point Striim next attempts to refresh its access token).
The Databricks endpoint becomes unreachable (for example, the SQL warehouse is stopped or deleted).
The Service Principal loses its User permission on the workspace.
The Service Principal loses USE CATALOG/USE SCHEMA privileges on the target catalog or schema.
The Service Principal loses MODIFY privilege on the target tables (this halts CDC writes specifically — an initial load that completed before the privilege was revoked is unaffected).
The GCS service account loses storage.objects.create or storage.objects.delete permission.
The Service Principal (or Databricks user) loses READ FILES permission on the GCS Storage Credential — this specifically causes COPY INTO to fail with a permission error, since READ FILES is what allows COPY INTO to read staged files via the Storage Credential.
In each case, restoring the missing permission or credential and restarting the application resolves the halt.
Altering Configuration on a Running Application
You can change certain configuration by undeploying the application, altering the relevant setting, testing the connection, and redeploying:
Authentication method: a Connection Profile can be altered between Personal Access Token and Service Principal authentication. Test the connection after altering, before redeploying.
External Stage Type: the staging area can be altered — for example, from S3 to GCS, or from ADLS Gen2 to GCS — by updating externalStageType and its associated properties, then redeploying.
Multiple Applications Sharing a Service Principal
Multiple Striim applications can use the same Service Principal credentials simultaneously without authentication conflicts. This is useful when several pipelines write to the same Databricks workspace under one service identity.
Combining Service Principal Authentication with GCS Staging
Service Principal authentication and GCS staging work together end-to-end, for both initial load and CDC — data flows from your source, through GCS staging, into Databricks via COPY INTO, authenticated throughout by the Service Principal.
GCS Bucket Auto-Creation
If the GCS bucket specified in gcsBucketName doesn't exist, Databricks Writer attempts to create it automatically, provided the GCS service account has the storage.buckets.create permission. If that permission is missing and the bucket doesn't exist, Databricks Writer reports a permission error rather than silently failing.
Restricting GCS Access with IAM Conditions
If you add an IAM Condition to your GCS service account restricting it to a specific bucket (for example, resource.name.startsWith("projects/_/buckets/<bucket-name>")), Databricks Writer can access that bucket normally, but access to any other bucket fails — confirming the restriction works as intended for tightening the scope of the staging service account's permissions.
Cross-Cloud Consistency for Service Principal Authentication
Service Principal (M2M OAuth) authentication has been verified against Databricks deployments on Azure, AWS, and Google Cloud, confirming it behaves consistently regardless of cloud platform — as expected, since Service Principal authentication is not tied to any cloud-specific mechanism.
Existing Databricks Writer Behavior, Re-Verified
Databricks Writer's pre-existing capabilities — write mode behavior (Append Only, Merge, Optimized Merge), key-column and column-map handling, table mapping (including wildcards and multi-table mappings), partitioned-table writes, application recovery after restart, and Ignorable Exception Code handling — have been re-verified against Service Principal authentication and continue to work as previously documented.
Observability
Key metrics for Databricks Writer applications are available through Striim's monitoring features. See Monitoring for details on accessing application-level and adapter-level metrics.
Databricks Writer writes ignored exceptions (when Ignorable Exception Code is configured, for example with the value TABLE_NOT_FOUND) to the application's exception store, which you can query using CREATE EXCEPTIONSTORE.
Databricks Writer also tracks batch-level metrics: Total Batches Created increments when a batch's stage file is created and queued locally, before upload; Total Batches Uploaded increments only once the upload succeeds. The difference between the two — sometimes shown as Total Batches Queued — reflects batches currently staged locally but not yet uploaded. A steadily growing gap indicates a backlog; see Upload Policy Troubleshooting.
Limitations
Data is written in batch mode. Streaming (real-time, row-by-row) writes are not supported in this release.
Service Principal authentication cannot be used with DBFS as the staging area, on any cloud. If you need Service Principal authentication, use S3, ADLS Gen2, or GCS staging instead.
GCS is supported only for Databricks hosted on Google Cloud. It cannot be used as a staging area for Databricks on AWS or Azure.
Personal staging locations are deprecated by both Databricks and Microsoft. Do not configure a new one; use S3, ADLS Gen2, or GCS instead.
Parallel Threads is not supported when Mode is Merge.
A Manual OAuth Refresh Token expires after 90 days, halting the application unless updated — use a Connection Profile instead to avoid manual token management.
See also Apache Iceberg Tables — Behavior and Limitations for behavior specific to Iceberg targets.
Troubleshooting
The table below describes the general cause of common runtime issues. Since the exact wording of error messages can change between Striim releases, this table describes the nature and cause of each issue rather than an exact error string — check your application's logs and exception store for the specific message.
Symptom | Likely cause |
|---|---|
Application halts shortly after deployment with an authentication-related error | Invalid or expired Personal Access Token, Client ID, or Client Secret; or a Connection URL that doesn't match your Databricks workspace |
Application halts with a connection-related error | The Databricks SQL warehouse or cluster is unreachable, stopped, or deleted |
Application halts with a permission-related error during CDC (after initial load succeeded) | The connecting identity (PAT user, Service Principal, or Entra ID identity) lost MODIFY privilege on the target tables |
Application halts with a permission-related error referencing the catalog or schema | The connecting identity lost USE CATALOG or USE SCHEMA privilege |
COPY INTO fails with a permission-related error (GCS staging only) | The connecting identity lost READ FILES permission on the Storage Credential, or the GCS service account lost object-level permissions on the bucket |
GCS bucket creation fails with a permission-related error | The GCS service account lacks the storage.buckets.create permission |
Application halts referencing an expired token (Manual OAuth only) | The Refresh Token has passed its 90-day expiration — use a Connection Profile instead of Manual OAuth to avoid this |