databricksdbfsfile Data Source

January 28, 2026 ยท View on GitHub

This data source allows to get file content from Databricks File System (DBFS).

-> This data source can only be used with a workspace-level provider!

Example Usage

data "databricks_dbfs_file" "report" {
  path            = "dbfs:/reports/some.csv"
  limit_file_size = "true"
}

Argument Reference

  • path - (Required) Path on DBFS for the file from which to get content.
  • limit_file_size - (Required - boolean) Do not load content for files larger than 4MB.
  • provider_config - (Optional) Configure the provider for management through account provider. This block consists of the following fields:
    • workspace_id - (Required) Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

Attribute Reference

This data source exports the following attributes:

  • content - base64-encoded file contents
  • file_size - size of the file in bytes

The following resources are used in the same context: