Manages Databricks platform metadata credentials for external metadata ingestion in dbt Cloud.
This resource configures credentials that allow dbt Cloud to connect directly to your Databricks workspace to ingest metadata outside of normal dbt project runs. This enables features like:
- Catalog Ingestion: Ingest metadata about tables/views not defined in dbt
- Cost Optimization: Query warehouse cost and performance data
- Cost Insights: Enhanced cost visibility and analysis
Note: At least one of
catalog_ingestion_enabled,cost_optimization_enabled, orcost_insights_enabledmust be enabled for the credential to be usable.
Note: The
connection_idcannot be changed after creation. To use a different connection, you must destroy and recreate the resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
// Example: Databricks Platform Metadata Credential
const example = new dbtcloud.DatabricksPlatformMetadataCredential("example", {
connectionId: databricks.id,
catalogIngestionEnabled: true,
costOptimizationEnabled: false,
costInsightsEnabled: false,
token: databricksToken,
catalog: "main",
});
import pulumi
import pulumi_dbtcloud as dbtcloud
# Example: Databricks Platform Metadata Credential
example = dbtcloud.DatabricksPlatformMetadataCredential("example",
connection_id=databricks["id"],
catalog_ingestion_enabled=True,
cost_optimization_enabled=False,
cost_insights_enabled=False,
token=databricks_token,
catalog="main")
package main
import (
"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Example: Databricks Platform Metadata Credential
_, err := dbtcloud.NewDatabricksPlatformMetadataCredential(ctx, "example", &dbtcloud.DatabricksPlatformMetadataCredentialArgs{
ConnectionId: pulumi.Any(databricks.Id),
CatalogIngestionEnabled: pulumi.Bool(true),
CostOptimizationEnabled: pulumi.Bool(false),
CostInsightsEnabled: pulumi.Bool(false),
Token: pulumi.Any(databricksToken),
Catalog: pulumi.String("main"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;
return await Deployment.RunAsync(() =>
{
// Example: Databricks Platform Metadata Credential
var example = new DbtCloud.DatabricksPlatformMetadataCredential("example", new()
{
ConnectionId = databricks.Id,
CatalogIngestionEnabled = true,
CostOptimizationEnabled = false,
CostInsightsEnabled = false,
Token = databricksToken,
Catalog = "main",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.DatabricksPlatformMetadataCredential;
import com.pulumi.dbtcloud.DatabricksPlatformMetadataCredentialArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Example: Databricks Platform Metadata Credential
var example = new DatabricksPlatformMetadataCredential("example", DatabricksPlatformMetadataCredentialArgs.builder()
.connectionId(databricks.id())
.catalogIngestionEnabled(true)
.costOptimizationEnabled(false)
.costInsightsEnabled(false)
.token(databricksToken)
.catalog("main")
.build());
}
}
resources:
# Example: Databricks Platform Metadata Credential
example:
type: dbtcloud:DatabricksPlatformMetadataCredential
properties:
connectionId: ${databricks.id}
catalogIngestionEnabled: true
costOptimizationEnabled: false
costInsightsEnabled: false
token: ${databricksToken}
catalog: main
Create DatabricksPlatformMetadataCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabricksPlatformMetadataCredential(name: string, args: DatabricksPlatformMetadataCredentialArgs, opts?: CustomResourceOptions);@overload
def DatabricksPlatformMetadataCredential(resource_name: str,
args: DatabricksPlatformMetadataCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DatabricksPlatformMetadataCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
catalog: Optional[str] = None,
connection_id: Optional[int] = None,
token: Optional[str] = None,
catalog_ingestion_enabled: Optional[bool] = None,
cost_insights_enabled: Optional[bool] = None,
cost_optimization_enabled: Optional[bool] = None)func NewDatabricksPlatformMetadataCredential(ctx *Context, name string, args DatabricksPlatformMetadataCredentialArgs, opts ...ResourceOption) (*DatabricksPlatformMetadataCredential, error)public DatabricksPlatformMetadataCredential(string name, DatabricksPlatformMetadataCredentialArgs args, CustomResourceOptions? opts = null)
public DatabricksPlatformMetadataCredential(String name, DatabricksPlatformMetadataCredentialArgs args)
public DatabricksPlatformMetadataCredential(String name, DatabricksPlatformMetadataCredentialArgs args, CustomResourceOptions options)
type: dbtcloud:DatabricksPlatformMetadataCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatabricksPlatformMetadataCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DatabricksPlatformMetadataCredentialArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabricksPlatformMetadataCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabricksPlatformMetadataCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabricksPlatformMetadataCredentialArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var databricksPlatformMetadataCredentialResource = new DbtCloud.DatabricksPlatformMetadataCredential("databricksPlatformMetadataCredentialResource", new()
{
Catalog = "string",
ConnectionId = 0,
Token = "string",
CatalogIngestionEnabled = false,
CostInsightsEnabled = false,
CostOptimizationEnabled = false,
});
example, err := dbtcloud.NewDatabricksPlatformMetadataCredential(ctx, "databricksPlatformMetadataCredentialResource", &dbtcloud.DatabricksPlatformMetadataCredentialArgs{
Catalog: pulumi.String("string"),
ConnectionId: pulumi.Int(0),
Token: pulumi.String("string"),
CatalogIngestionEnabled: pulumi.Bool(false),
CostInsightsEnabled: pulumi.Bool(false),
CostOptimizationEnabled: pulumi.Bool(false),
})
var databricksPlatformMetadataCredentialResource = new DatabricksPlatformMetadataCredential("databricksPlatformMetadataCredentialResource", DatabricksPlatformMetadataCredentialArgs.builder()
.catalog("string")
.connectionId(0)
.token("string")
.catalogIngestionEnabled(false)
.costInsightsEnabled(false)
.costOptimizationEnabled(false)
.build());
databricks_platform_metadata_credential_resource = dbtcloud.DatabricksPlatformMetadataCredential("databricksPlatformMetadataCredentialResource",
catalog="string",
connection_id=0,
token="string",
catalog_ingestion_enabled=False,
cost_insights_enabled=False,
cost_optimization_enabled=False)
const databricksPlatformMetadataCredentialResource = new dbtcloud.DatabricksPlatformMetadataCredential("databricksPlatformMetadataCredentialResource", {
catalog: "string",
connectionId: 0,
token: "string",
catalogIngestionEnabled: false,
costInsightsEnabled: false,
costOptimizationEnabled: false,
});
type: dbtcloud:DatabricksPlatformMetadataCredential
properties:
catalog: string
catalogIngestionEnabled: false
connectionId: 0
costInsightsEnabled: false
costOptimizationEnabled: false
token: string
DatabricksPlatformMetadataCredential Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DatabricksPlatformMetadataCredential resource accepts the following input properties:
- Catalog string
- The Unity Catalog name to use.
- Connection
Id int - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- Token string
- The Databricks personal access token.
- Catalog
Ingestion boolEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- Cost
Insights boolEnabled - Whether cost insights is enabled for this credential.
- Cost
Optimization boolEnabled - Whether cost optimization data collection is enabled for this credential.
- Catalog string
- The Unity Catalog name to use.
- Connection
Id int - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- Token string
- The Databricks personal access token.
- Catalog
Ingestion boolEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- Cost
Insights boolEnabled - Whether cost insights is enabled for this credential.
- Cost
Optimization boolEnabled - Whether cost optimization data collection is enabled for this credential.
- catalog String
- The Unity Catalog name to use.
- connection
Id Integer - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- token String
- The Databricks personal access token.
- catalog
Ingestion BooleanEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- cost
Insights BooleanEnabled - Whether cost insights is enabled for this credential.
- cost
Optimization BooleanEnabled - Whether cost optimization data collection is enabled for this credential.
- catalog string
- The Unity Catalog name to use.
- connection
Id number - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- token string
- The Databricks personal access token.
- catalog
Ingestion booleanEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- cost
Insights booleanEnabled - Whether cost insights is enabled for this credential.
- cost
Optimization booleanEnabled - Whether cost optimization data collection is enabled for this credential.
- catalog str
- The Unity Catalog name to use.
- connection_
id int - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- token str
- The Databricks personal access token.
- catalog_
ingestion_ boolenabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- cost_
insights_ boolenabled - Whether cost insights is enabled for this credential.
- cost_
optimization_ boolenabled - Whether cost optimization data collection is enabled for this credential.
- catalog String
- The Unity Catalog name to use.
- connection
Id Number - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- token String
- The Databricks personal access token.
- catalog
Ingestion BooleanEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- cost
Insights BooleanEnabled - Whether cost insights is enabled for this credential.
- cost
Optimization BooleanEnabled - Whether cost optimization data collection is enabled for this credential.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabricksPlatformMetadataCredential resource produces the following output properties:
- Adapter
Version string - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- Credential
Id int - The ID of the platform metadata credential.
- Id string
- The provider-assigned unique ID for this managed resource.
- Adapter
Version string - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- Credential
Id int - The ID of the platform metadata credential.
- Id string
- The provider-assigned unique ID for this managed resource.
- adapter
Version String - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- credential
Id Integer - The ID of the platform metadata credential.
- id String
- The provider-assigned unique ID for this managed resource.
- adapter
Version string - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- credential
Id number - The ID of the platform metadata credential.
- id string
- The provider-assigned unique ID for this managed resource.
- adapter_
version str - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- credential_
id int - The ID of the platform metadata credential.
- id str
- The provider-assigned unique ID for this managed resource.
- adapter
Version String - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- credential
Id Number - The ID of the platform metadata credential.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DatabricksPlatformMetadataCredential Resource
Get an existing DatabricksPlatformMetadataCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DatabricksPlatformMetadataCredentialState, opts?: CustomResourceOptions): DatabricksPlatformMetadataCredential@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
adapter_version: Optional[str] = None,
catalog: Optional[str] = None,
catalog_ingestion_enabled: Optional[bool] = None,
connection_id: Optional[int] = None,
cost_insights_enabled: Optional[bool] = None,
cost_optimization_enabled: Optional[bool] = None,
credential_id: Optional[int] = None,
token: Optional[str] = None) -> DatabricksPlatformMetadataCredentialfunc GetDatabricksPlatformMetadataCredential(ctx *Context, name string, id IDInput, state *DatabricksPlatformMetadataCredentialState, opts ...ResourceOption) (*DatabricksPlatformMetadataCredential, error)public static DatabricksPlatformMetadataCredential Get(string name, Input<string> id, DatabricksPlatformMetadataCredentialState? state, CustomResourceOptions? opts = null)public static DatabricksPlatformMetadataCredential get(String name, Output<String> id, DatabricksPlatformMetadataCredentialState state, CustomResourceOptions options)resources: _: type: dbtcloud:DatabricksPlatformMetadataCredential get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Adapter
Version string - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- Catalog string
- The Unity Catalog name to use.
- Catalog
Ingestion boolEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- Connection
Id int - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- Cost
Insights boolEnabled - Whether cost insights is enabled for this credential.
- Cost
Optimization boolEnabled - Whether cost optimization data collection is enabled for this credential.
- Credential
Id int - The ID of the platform metadata credential.
- Token string
- The Databricks personal access token.
- Adapter
Version string - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- Catalog string
- The Unity Catalog name to use.
- Catalog
Ingestion boolEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- Connection
Id int - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- Cost
Insights boolEnabled - Whether cost insights is enabled for this credential.
- Cost
Optimization boolEnabled - Whether cost optimization data collection is enabled for this credential.
- Credential
Id int - The ID of the platform metadata credential.
- Token string
- The Databricks personal access token.
- adapter
Version String - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- catalog String
- The Unity Catalog name to use.
- catalog
Ingestion BooleanEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- connection
Id Integer - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- cost
Insights BooleanEnabled - Whether cost insights is enabled for this credential.
- cost
Optimization BooleanEnabled - Whether cost optimization data collection is enabled for this credential.
- credential
Id Integer - The ID of the platform metadata credential.
- token String
- The Databricks personal access token.
- adapter
Version string - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- catalog string
- The Unity Catalog name to use.
- catalog
Ingestion booleanEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- connection
Id number - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- cost
Insights booleanEnabled - Whether cost insights is enabled for this credential.
- cost
Optimization booleanEnabled - Whether cost optimization data collection is enabled for this credential.
- credential
Id number - The ID of the platform metadata credential.
- token string
- The Databricks personal access token.
- adapter_
version str - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- catalog str
- The Unity Catalog name to use.
- catalog_
ingestion_ boolenabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- connection_
id int - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- cost_
insights_ boolenabled - Whether cost insights is enabled for this credential.
- cost_
optimization_ boolenabled - Whether cost optimization data collection is enabled for this credential.
- credential_
id int - The ID of the platform metadata credential.
- token str
- The Databricks personal access token.
- adapter
Version String - The adapter version derived from the connection (e.g., 'snowflakev0', 'databricksv0'). This is read-only and determined by the connection.
- catalog String
- The Unity Catalog name to use.
- catalog
Ingestion BooleanEnabled - Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
- connection
Id Number - The ID of the global connection this credential is associated with. Cannot be changed after creation.
- cost
Insights BooleanEnabled - Whether cost insights is enabled for this credential.
- cost
Optimization BooleanEnabled - Whether cost optimization data collection is enabled for this credential.
- credential
Id Number - The ID of the platform metadata credential.
- token String
- The Databricks personal access token.
Package Details
- Repository
- dbtcloud pulumi/pulumi-dbtcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dbtcloudTerraform Provider.
