dbtcloud.Job
Explore with Pulumi AI
In October 2023, CI improvements have been rolled out to dbt Cloud with minor impacts to some jobs: more info.
Those improvements include modifications to deferral which was historically set at the job level and will now be set at the environment level. Deferral can still be set to “self” by settingself_deferringtotruebut with the new approach, deferral to other runs need to be done withdeferring_environment_idinstead ofdeferring_job_id.
New with 0.3.1,
triggersnow accepts aon_mergevalue to trigger jobs when code is merged in git. Ifon_mergeistrueall other triggers need to befalse.
For now, it is not a mandatory field, but it will be in a future version. Please addon_mergein your config or modules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
// a job that has github_webhook and git_provider_webhook 
// set to false will be categorized as a "Deploy Job"
const dailyJob = new dbtcloud.Job("daily_job", {
    environmentId: prodEnvironment.environmentId,
    executeSteps: ["dbt build"],
    generateDocs: true,
    isActive: true,
    name: "Daily job",
    numThreads: 64,
    projectId: dbtProject.id,
    runGenerateSources: true,
    targetName: "default",
    triggers: {
        github_webhook: false,
        git_provider_webhook: false,
        schedule: true,
        on_merge: false,
    },
    scheduleDays: [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
    ],
    scheduleType: "days_of_week",
    scheduleHours: [0],
});
// a job that has github_webhook and git_provider_webhook set 
// to true will be categorized as a "Continuous Integration Job"
const ciJob = new dbtcloud.Job("ci_job", {
    environmentId: ciEnvironment.environmentId,
    executeSteps: ["dbt build -s state:modified+ --fail-fast"],
    generateDocs: false,
    deferringEnvironmentId: prodEnvironment.environmentId,
    name: "CI Job",
    numThreads: 32,
    projectId: dbtProject.id,
    runGenerateSources: false,
    runLint: true,
    errorsOnLintFailure: true,
    triggers: {
        github_webhook: true,
        git_provider_webhook: true,
        schedule: false,
        on_merge: false,
    },
    scheduleDays: [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
    ],
    scheduleType: "days_of_week",
});
// a job that is set to be triggered after another job finishes
// this is sometimes referred as 'job chaining'
const downstreamJob = new dbtcloud.Job("downstream_job", {
    environmentId: project2ProdEnvironment.environmentId,
    executeSteps: ["dbt build -s +my_model"],
    generateDocs: true,
    name: "Downstream job in project 2",
    numThreads: 32,
    projectId: dbtProject2.id,
    runGenerateSources: true,
    triggers: {
        github_webhook: false,
        git_provider_webhook: false,
        schedule: false,
        on_merge: false,
    },
    scheduleDays: [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
    ],
    scheduleType: "days_of_week",
    jobCompletionTriggerCondition: {
        jobId: dailyJob.id,
        projectId: dbtProject.id,
        statuses: ["success"],
    },
});
import pulumi
import pulumi_dbtcloud as dbtcloud
# a job that has github_webhook and git_provider_webhook 
# set to false will be categorized as a "Deploy Job"
daily_job = dbtcloud.Job("daily_job",
    environment_id=prod_environment["environmentId"],
    execute_steps=["dbt build"],
    generate_docs=True,
    is_active=True,
    name="Daily job",
    num_threads=64,
    project_id=dbt_project["id"],
    run_generate_sources=True,
    target_name="default",
    triggers={
        "github_webhook": False,
        "git_provider_webhook": False,
        "schedule": True,
        "on_merge": False,
    },
    schedule_days=[
        0,
        1,
        2,
        3,
        4,
        5,
        6,
    ],
    schedule_type="days_of_week",
    schedule_hours=[0])
# a job that has github_webhook and git_provider_webhook set 
# to true will be categorized as a "Continuous Integration Job"
ci_job = dbtcloud.Job("ci_job",
    environment_id=ci_environment["environmentId"],
    execute_steps=["dbt build -s state:modified+ --fail-fast"],
    generate_docs=False,
    deferring_environment_id=prod_environment["environmentId"],
    name="CI Job",
    num_threads=32,
    project_id=dbt_project["id"],
    run_generate_sources=False,
    run_lint=True,
    errors_on_lint_failure=True,
    triggers={
        "github_webhook": True,
        "git_provider_webhook": True,
        "schedule": False,
        "on_merge": False,
    },
    schedule_days=[
        0,
        1,
        2,
        3,
        4,
        5,
        6,
    ],
    schedule_type="days_of_week")
# a job that is set to be triggered after another job finishes
# this is sometimes referred as 'job chaining'
downstream_job = dbtcloud.Job("downstream_job",
    environment_id=project2_prod_environment["environmentId"],
    execute_steps=["dbt build -s +my_model"],
    generate_docs=True,
    name="Downstream job in project 2",
    num_threads=32,
    project_id=dbt_project2["id"],
    run_generate_sources=True,
    triggers={
        "github_webhook": False,
        "git_provider_webhook": False,
        "schedule": False,
        "on_merge": False,
    },
    schedule_days=[
        0,
        1,
        2,
        3,
        4,
        5,
        6,
    ],
    schedule_type="days_of_week",
    job_completion_trigger_condition={
        "job_id": daily_job.id,
        "project_id": dbt_project["id"],
        "statuses": ["success"],
    })
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 {
		// a job that has github_webhook and git_provider_webhook
		// set to false will be categorized as a "Deploy Job"
		dailyJob, err := dbtcloud.NewJob(ctx, "daily_job", &dbtcloud.JobArgs{
			EnvironmentId: pulumi.Any(prodEnvironment.EnvironmentId),
			ExecuteSteps: pulumi.StringArray{
				pulumi.String("dbt build"),
			},
			GenerateDocs:       pulumi.Bool(true),
			IsActive:           pulumi.Bool(true),
			Name:               pulumi.String("Daily job"),
			NumThreads:         pulumi.Int(64),
			ProjectId:          pulumi.Any(dbtProject.Id),
			RunGenerateSources: pulumi.Bool(true),
			TargetName:         pulumi.String("default"),
			Triggers: pulumi.BoolMap{
				"github_webhook":       pulumi.Bool(false),
				"git_provider_webhook": pulumi.Bool(false),
				"schedule":             pulumi.Bool(true),
				"on_merge":             pulumi.Bool(false),
			},
			ScheduleDays: pulumi.IntArray{
				pulumi.Int(0),
				pulumi.Int(1),
				pulumi.Int(2),
				pulumi.Int(3),
				pulumi.Int(4),
				pulumi.Int(5),
				pulumi.Int(6),
			},
			ScheduleType: pulumi.String("days_of_week"),
			ScheduleHours: pulumi.IntArray{
				pulumi.Int(0),
			},
		})
		if err != nil {
			return err
		}
		// a job that has github_webhook and git_provider_webhook set
		// to true will be categorized as a "Continuous Integration Job"
		_, err = dbtcloud.NewJob(ctx, "ci_job", &dbtcloud.JobArgs{
			EnvironmentId: pulumi.Any(ciEnvironment.EnvironmentId),
			ExecuteSteps: pulumi.StringArray{
				pulumi.String("dbt build -s state:modified+ --fail-fast"),
			},
			GenerateDocs:           pulumi.Bool(false),
			DeferringEnvironmentId: pulumi.Any(prodEnvironment.EnvironmentId),
			Name:                   pulumi.String("CI Job"),
			NumThreads:             pulumi.Int(32),
			ProjectId:              pulumi.Any(dbtProject.Id),
			RunGenerateSources:     pulumi.Bool(false),
			RunLint:                pulumi.Bool(true),
			ErrorsOnLintFailure:    pulumi.Bool(true),
			Triggers: pulumi.BoolMap{
				"github_webhook":       pulumi.Bool(true),
				"git_provider_webhook": pulumi.Bool(true),
				"schedule":             pulumi.Bool(false),
				"on_merge":             pulumi.Bool(false),
			},
			ScheduleDays: pulumi.IntArray{
				pulumi.Int(0),
				pulumi.Int(1),
				pulumi.Int(2),
				pulumi.Int(3),
				pulumi.Int(4),
				pulumi.Int(5),
				pulumi.Int(6),
			},
			ScheduleType: pulumi.String("days_of_week"),
		})
		if err != nil {
			return err
		}
		// a job that is set to be triggered after another job finishes
		// this is sometimes referred as 'job chaining'
		_, err = dbtcloud.NewJob(ctx, "downstream_job", &dbtcloud.JobArgs{
			EnvironmentId: pulumi.Any(project2ProdEnvironment.EnvironmentId),
			ExecuteSteps: pulumi.StringArray{
				pulumi.String("dbt build -s +my_model"),
			},
			GenerateDocs:       pulumi.Bool(true),
			Name:               pulumi.String("Downstream job in project 2"),
			NumThreads:         pulumi.Int(32),
			ProjectId:          pulumi.Any(dbtProject2.Id),
			RunGenerateSources: pulumi.Bool(true),
			Triggers: pulumi.BoolMap{
				"github_webhook":       pulumi.Bool(false),
				"git_provider_webhook": pulumi.Bool(false),
				"schedule":             pulumi.Bool(false),
				"on_merge":             pulumi.Bool(false),
			},
			ScheduleDays: pulumi.IntArray{
				pulumi.Int(0),
				pulumi.Int(1),
				pulumi.Int(2),
				pulumi.Int(3),
				pulumi.Int(4),
				pulumi.Int(5),
				pulumi.Int(6),
			},
			ScheduleType: pulumi.String("days_of_week"),
			JobCompletionTriggerCondition: &dbtcloud.JobJobCompletionTriggerConditionArgs{
				JobId:     dailyJob.ID(),
				ProjectId: pulumi.Any(dbtProject.Id),
				Statuses: pulumi.StringArray{
					pulumi.String("success"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;
return await Deployment.RunAsync(() => 
{
    // a job that has github_webhook and git_provider_webhook 
    // set to false will be categorized as a "Deploy Job"
    var dailyJob = new DbtCloud.Job("daily_job", new()
    {
        EnvironmentId = prodEnvironment.EnvironmentId,
        ExecuteSteps = new[]
        {
            "dbt build",
        },
        GenerateDocs = true,
        IsActive = true,
        Name = "Daily job",
        NumThreads = 64,
        ProjectId = dbtProject.Id,
        RunGenerateSources = true,
        TargetName = "default",
        Triggers = 
        {
            { "github_webhook", false },
            { "git_provider_webhook", false },
            { "schedule", true },
            { "on_merge", false },
        },
        ScheduleDays = new[]
        {
            0,
            1,
            2,
            3,
            4,
            5,
            6,
        },
        ScheduleType = "days_of_week",
        ScheduleHours = new[]
        {
            0,
        },
    });
    // a job that has github_webhook and git_provider_webhook set 
    // to true will be categorized as a "Continuous Integration Job"
    var ciJob = new DbtCloud.Job("ci_job", new()
    {
        EnvironmentId = ciEnvironment.EnvironmentId,
        ExecuteSteps = new[]
        {
            "dbt build -s state:modified+ --fail-fast",
        },
        GenerateDocs = false,
        DeferringEnvironmentId = prodEnvironment.EnvironmentId,
        Name = "CI Job",
        NumThreads = 32,
        ProjectId = dbtProject.Id,
        RunGenerateSources = false,
        RunLint = true,
        ErrorsOnLintFailure = true,
        Triggers = 
        {
            { "github_webhook", true },
            { "git_provider_webhook", true },
            { "schedule", false },
            { "on_merge", false },
        },
        ScheduleDays = new[]
        {
            0,
            1,
            2,
            3,
            4,
            5,
            6,
        },
        ScheduleType = "days_of_week",
    });
    // a job that is set to be triggered after another job finishes
    // this is sometimes referred as 'job chaining'
    var downstreamJob = new DbtCloud.Job("downstream_job", new()
    {
        EnvironmentId = project2ProdEnvironment.EnvironmentId,
        ExecuteSteps = new[]
        {
            "dbt build -s +my_model",
        },
        GenerateDocs = true,
        Name = "Downstream job in project 2",
        NumThreads = 32,
        ProjectId = dbtProject2.Id,
        RunGenerateSources = true,
        Triggers = 
        {
            { "github_webhook", false },
            { "git_provider_webhook", false },
            { "schedule", false },
            { "on_merge", false },
        },
        ScheduleDays = new[]
        {
            0,
            1,
            2,
            3,
            4,
            5,
            6,
        },
        ScheduleType = "days_of_week",
        CompletionTriggerCondition = new DbtCloud.Inputs.JobJobCompletionTriggerConditionArgs
        {
            JobId = dailyJob.Id,
            ProjectId = dbtProject.Id,
            Statuses = new[]
            {
                "success",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.Job;
import com.pulumi.dbtcloud.JobArgs;
import com.pulumi.dbtcloud.inputs.JobJobCompletionTriggerConditionArgs;
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) {
        // a job that has github_webhook and git_provider_webhook 
        // set to false will be categorized as a "Deploy Job"
        var dailyJob = new Job("dailyJob", JobArgs.builder()
            .environmentId(prodEnvironment.environmentId())
            .executeSteps("dbt build")
            .generateDocs(true)
            .isActive(true)
            .name("Daily job")
            .numThreads(64)
            .projectId(dbtProject.id())
            .runGenerateSources(true)
            .targetName("default")
            .triggers(Map.ofEntries(
                Map.entry("github_webhook", false),
                Map.entry("git_provider_webhook", false),
                Map.entry("schedule", true),
                Map.entry("on_merge", false)
            ))
            .scheduleDays(            
                0,
                1,
                2,
                3,
                4,
                5,
                6)
            .scheduleType("days_of_week")
            .scheduleHours(0)
            .build());
        // a job that has github_webhook and git_provider_webhook set 
        // to true will be categorized as a "Continuous Integration Job"
        var ciJob = new Job("ciJob", JobArgs.builder()
            .environmentId(ciEnvironment.environmentId())
            .executeSteps("dbt build -s state:modified+ --fail-fast")
            .generateDocs(false)
            .deferringEnvironmentId(prodEnvironment.environmentId())
            .name("CI Job")
            .numThreads(32)
            .projectId(dbtProject.id())
            .runGenerateSources(false)
            .runLint(true)
            .errorsOnLintFailure(true)
            .triggers(Map.ofEntries(
                Map.entry("github_webhook", true),
                Map.entry("git_provider_webhook", true),
                Map.entry("schedule", false),
                Map.entry("on_merge", false)
            ))
            .scheduleDays(            
                0,
                1,
                2,
                3,
                4,
                5,
                6)
            .scheduleType("days_of_week")
            .build());
        // a job that is set to be triggered after another job finishes
        // this is sometimes referred as 'job chaining'
        var downstreamJob = new Job("downstreamJob", JobArgs.builder()
            .environmentId(project2ProdEnvironment.environmentId())
            .executeSteps("dbt build -s +my_model")
            .generateDocs(true)
            .name("Downstream job in project 2")
            .numThreads(32)
            .projectId(dbtProject2.id())
            .runGenerateSources(true)
            .triggers(Map.ofEntries(
                Map.entry("github_webhook", false),
                Map.entry("git_provider_webhook", false),
                Map.entry("schedule", false),
                Map.entry("on_merge", false)
            ))
            .scheduleDays(            
                0,
                1,
                2,
                3,
                4,
                5,
                6)
            .scheduleType("days_of_week")
            .jobCompletionTriggerCondition(JobJobCompletionTriggerConditionArgs.builder()
                .jobId(dailyJob.id())
                .projectId(dbtProject.id())
                .statuses("success")
                .build())
            .build());
    }
}
resources:
  # a job that has github_webhook and git_provider_webhook 
  # set to false will be categorized as a "Deploy Job"
  dailyJob:
    type: dbtcloud:Job
    name: daily_job
    properties:
      environmentId: ${prodEnvironment.environmentId}
      executeSteps:
        - dbt build
      generateDocs: true
      isActive: true
      name: Daily job
      numThreads: 64
      projectId: ${dbtProject.id}
      runGenerateSources: true
      targetName: default
      triggers:
        github_webhook: false
        git_provider_webhook: false
        schedule: true
        on_merge: false
      scheduleDays:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      scheduleType: days_of_week
      scheduleHours:
        - 0
  # a job that has github_webhook and git_provider_webhook set 
  # to true will be categorized as a "Continuous Integration Job"
  ciJob:
    type: dbtcloud:Job
    name: ci_job
    properties:
      environmentId: ${ciEnvironment.environmentId}
      executeSteps:
        - dbt build -s state:modified+ --fail-fast
      generateDocs: false
      deferringEnvironmentId: ${prodEnvironment.environmentId}
      name: CI Job
      numThreads: 32
      projectId: ${dbtProject.id}
      runGenerateSources: false
      runLint: true
      errorsOnLintFailure: true
      triggers:
        github_webhook: true
        git_provider_webhook: true
        schedule: false
        on_merge: false
      scheduleDays:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      scheduleType: days_of_week
  # a job that is set to be triggered after another job finishes
  # this is sometimes referred as 'job chaining'
  downstreamJob:
    type: dbtcloud:Job
    name: downstream_job
    properties:
      environmentId: ${project2ProdEnvironment.environmentId}
      executeSteps:
        - dbt build -s +my_model
      generateDocs: true
      name: Downstream job in project 2
      numThreads: 32
      projectId: ${dbtProject2.id}
      runGenerateSources: true
      triggers:
        github_webhook: false
        git_provider_webhook: false
        schedule: false
        on_merge: false
      scheduleDays:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      scheduleType: days_of_week
      jobCompletionTriggerCondition:
        jobId: ${dailyJob.id}
        projectId: ${dbtProject.id}
        statuses:
          - success
Create Job Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Job(name: string, args: JobArgs, opts?: CustomResourceOptions);@overload
def Job(resource_name: str,
        args: JobArgs,
        opts: Optional[ResourceOptions] = None)
@overload
def Job(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        project_id: Optional[int] = None,
        environment_id: Optional[int] = None,
        triggers: Optional[Mapping[str, bool]] = None,
        execute_steps: Optional[Sequence[str]] = None,
        timeout_seconds: Optional[int] = None,
        run_compare_changes: Optional[bool] = None,
        errors_on_lint_failure: Optional[bool] = None,
        deferring_job_id: Optional[int] = None,
        generate_docs: Optional[bool] = None,
        is_active: Optional[bool] = None,
        job_completion_trigger_condition: Optional[JobJobCompletionTriggerConditionArgs] = None,
        job_type: Optional[str] = None,
        triggers_on_draft_pr: Optional[bool] = None,
        dbt_version: Optional[str] = None,
        schedule_cron: Optional[str] = None,
        description: Optional[str] = None,
        run_generate_sources: Optional[bool] = None,
        run_lint: Optional[bool] = None,
        compare_changes_flags: Optional[str] = None,
        schedule_days: Optional[Sequence[int]] = None,
        schedule_hours: Optional[Sequence[int]] = None,
        schedule_interval: Optional[int] = None,
        schedule_type: Optional[str] = None,
        self_deferring: Optional[bool] = None,
        target_name: Optional[str] = None,
        num_threads: Optional[int] = None,
        deferring_environment_id: Optional[int] = None,
        name: Optional[str] = None)func NewJob(ctx *Context, name string, args JobArgs, opts ...ResourceOption) (*Job, error)public Job(string name, JobArgs args, CustomResourceOptions? opts = null)type: dbtcloud:Job
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 JobArgs
- 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 JobArgs
- 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 JobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args JobArgs
- 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 jobResource = new DbtCloud.Job("jobResource", new()
{
    ProjectId = 0,
    EnvironmentId = 0,
    Triggers = 
    {
        { "string", false },
    },
    ExecuteSteps = new[]
    {
        "string",
    },
    TimeoutSeconds = 0,
    RunCompareChanges = false,
    ErrorsOnLintFailure = false,
    DeferringJobId = 0,
    GenerateDocs = false,
    IsActive = false,
    CompletionTriggerCondition = new DbtCloud.Inputs.JobJobCompletionTriggerConditionArgs
    {
        JobId = 0,
        ProjectId = 0,
        Statuses = new[]
        {
            "string",
        },
    },
    JobType = "string",
    TriggersOnDraftPr = false,
    DbtVersion = "string",
    ScheduleCron = "string",
    Description = "string",
    RunGenerateSources = false,
    RunLint = false,
    CompareChangesFlags = "string",
    ScheduleDays = new[]
    {
        0,
    },
    ScheduleHours = new[]
    {
        0,
    },
    ScheduleInterval = 0,
    ScheduleType = "string",
    SelfDeferring = false,
    TargetName = "string",
    NumThreads = 0,
    DeferringEnvironmentId = 0,
    Name = "string",
});
example, err := dbtcloud.NewJob(ctx, "jobResource", &dbtcloud.JobArgs{
	ProjectId:     pulumi.Int(0),
	EnvironmentId: pulumi.Int(0),
	Triggers: pulumi.BoolMap{
		"string": pulumi.Bool(false),
	},
	ExecuteSteps: pulumi.StringArray{
		pulumi.String("string"),
	},
	TimeoutSeconds:      pulumi.Int(0),
	RunCompareChanges:   pulumi.Bool(false),
	ErrorsOnLintFailure: pulumi.Bool(false),
	DeferringJobId:      pulumi.Int(0),
	GenerateDocs:        pulumi.Bool(false),
	IsActive:            pulumi.Bool(false),
	JobCompletionTriggerCondition: &dbtcloud.JobJobCompletionTriggerConditionArgs{
		JobId:     pulumi.Int(0),
		ProjectId: pulumi.Int(0),
		Statuses: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	JobType:             pulumi.String("string"),
	TriggersOnDraftPr:   pulumi.Bool(false),
	DbtVersion:          pulumi.String("string"),
	ScheduleCron:        pulumi.String("string"),
	Description:         pulumi.String("string"),
	RunGenerateSources:  pulumi.Bool(false),
	RunLint:             pulumi.Bool(false),
	CompareChangesFlags: pulumi.String("string"),
	ScheduleDays: pulumi.IntArray{
		pulumi.Int(0),
	},
	ScheduleHours: pulumi.IntArray{
		pulumi.Int(0),
	},
	ScheduleInterval:       pulumi.Int(0),
	ScheduleType:           pulumi.String("string"),
	SelfDeferring:          pulumi.Bool(false),
	TargetName:             pulumi.String("string"),
	NumThreads:             pulumi.Int(0),
	DeferringEnvironmentId: pulumi.Int(0),
	Name:                   pulumi.String("string"),
})
var jobResource = new Job("jobResource", JobArgs.builder()
    .projectId(0)
    .environmentId(0)
    .triggers(Map.of("string", false))
    .executeSteps("string")
    .timeoutSeconds(0)
    .runCompareChanges(false)
    .errorsOnLintFailure(false)
    .deferringJobId(0)
    .generateDocs(false)
    .isActive(false)
    .jobCompletionTriggerCondition(JobJobCompletionTriggerConditionArgs.builder()
        .jobId(0)
        .projectId(0)
        .statuses("string")
        .build())
    .jobType("string")
    .triggersOnDraftPr(false)
    .dbtVersion("string")
    .scheduleCron("string")
    .description("string")
    .runGenerateSources(false)
    .runLint(false)
    .compareChangesFlags("string")
    .scheduleDays(0)
    .scheduleHours(0)
    .scheduleInterval(0)
    .scheduleType("string")
    .selfDeferring(false)
    .targetName("string")
    .numThreads(0)
    .deferringEnvironmentId(0)
    .name("string")
    .build());
job_resource = dbtcloud.Job("jobResource",
    project_id=0,
    environment_id=0,
    triggers={
        "string": False,
    },
    execute_steps=["string"],
    timeout_seconds=0,
    run_compare_changes=False,
    errors_on_lint_failure=False,
    deferring_job_id=0,
    generate_docs=False,
    is_active=False,
    job_completion_trigger_condition={
        "job_id": 0,
        "project_id": 0,
        "statuses": ["string"],
    },
    job_type="string",
    triggers_on_draft_pr=False,
    dbt_version="string",
    schedule_cron="string",
    description="string",
    run_generate_sources=False,
    run_lint=False,
    compare_changes_flags="string",
    schedule_days=[0],
    schedule_hours=[0],
    schedule_interval=0,
    schedule_type="string",
    self_deferring=False,
    target_name="string",
    num_threads=0,
    deferring_environment_id=0,
    name="string")
const jobResource = new dbtcloud.Job("jobResource", {
    projectId: 0,
    environmentId: 0,
    triggers: {
        string: false,
    },
    executeSteps: ["string"],
    timeoutSeconds: 0,
    runCompareChanges: false,
    errorsOnLintFailure: false,
    deferringJobId: 0,
    generateDocs: false,
    isActive: false,
    jobCompletionTriggerCondition: {
        jobId: 0,
        projectId: 0,
        statuses: ["string"],
    },
    jobType: "string",
    triggersOnDraftPr: false,
    dbtVersion: "string",
    scheduleCron: "string",
    description: "string",
    runGenerateSources: false,
    runLint: false,
    compareChangesFlags: "string",
    scheduleDays: [0],
    scheduleHours: [0],
    scheduleInterval: 0,
    scheduleType: "string",
    selfDeferring: false,
    targetName: "string",
    numThreads: 0,
    deferringEnvironmentId: 0,
    name: "string",
});
type: dbtcloud:Job
properties:
    compareChangesFlags: string
    dbtVersion: string
    deferringEnvironmentId: 0
    deferringJobId: 0
    description: string
    environmentId: 0
    errorsOnLintFailure: false
    executeSteps:
        - string
    generateDocs: false
    isActive: false
    jobCompletionTriggerCondition:
        jobId: 0
        projectId: 0
        statuses:
            - string
    jobType: string
    name: string
    numThreads: 0
    projectId: 0
    runCompareChanges: false
    runGenerateSources: false
    runLint: false
    scheduleCron: string
    scheduleDays:
        - 0
    scheduleHours:
        - 0
    scheduleInterval: 0
    scheduleType: string
    selfDeferring: false
    targetName: string
    timeoutSeconds: 0
    triggers:
        string: false
    triggersOnDraftPr: false
Job 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 Job resource accepts the following input properties:
- EnvironmentId int
- Environment ID to create the job in
- ExecuteSteps List<string>
- List of commands to execute for the job
- ProjectId int
- Project ID to create the job in
- Triggers Dictionary<string, bool>
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- CompareChanges stringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- CompletionTrigger Pulumi.Condition Dbt Cloud. Inputs. Job Job Completion Trigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- DbtVersion string
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- DeferringEnvironment intId 
- Environment identifier that this job defers to (new deferring approach)
- DeferringJob intId 
- Job identifier that this job defers to (legacy deferring approach)
- Description string
- Description for the job
- ErrorsOn boolLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- GenerateDocs bool
- Flag for whether the job should generate documentation
- IsActive bool
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- JobType string
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- Name string
- Job name
- NumThreads int
- Number of threads to use in the job
- RunCompare boolChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- RunGenerate boolSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- RunLint bool
- Whether the CI job should lint SQL changes. Defaults to false.
- ScheduleCron string
- Custom cron expression for schedule
- ScheduleDays List<int>
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- ScheduleHours List<int>
- List of hours to execute the job at if running on a schedule
- ScheduleInterval int
- Number of hours between job executions if running on a schedule
- ScheduleType string
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- SelfDeferring bool
- Whether this job defers on a previous run of itself
- TargetName string
- Target name for the dbt profile
- TimeoutSeconds int
- Number of seconds to allow the job to run before timing out
- TriggersOn boolDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- EnvironmentId int
- Environment ID to create the job in
- ExecuteSteps []string
- List of commands to execute for the job
- ProjectId int
- Project ID to create the job in
- Triggers map[string]bool
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- CompareChanges stringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- DbtVersion string
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- DeferringEnvironment intId 
- Environment identifier that this job defers to (new deferring approach)
- DeferringJob intId 
- Job identifier that this job defers to (legacy deferring approach)
- Description string
- Description for the job
- ErrorsOn boolLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- GenerateDocs bool
- Flag for whether the job should generate documentation
- IsActive bool
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- JobCompletion JobTrigger Condition Job Completion Trigger Condition Args 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- JobType string
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- Name string
- Job name
- NumThreads int
- Number of threads to use in the job
- RunCompare boolChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- RunGenerate boolSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- RunLint bool
- Whether the CI job should lint SQL changes. Defaults to false.
- ScheduleCron string
- Custom cron expression for schedule
- ScheduleDays []int
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- ScheduleHours []int
- List of hours to execute the job at if running on a schedule
- ScheduleInterval int
- Number of hours between job executions if running on a schedule
- ScheduleType string
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- SelfDeferring bool
- Whether this job defers on a previous run of itself
- TargetName string
- Target name for the dbt profile
- TimeoutSeconds int
- Number of seconds to allow the job to run before timing out
- TriggersOn boolDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- environmentId Integer
- Environment ID to create the job in
- executeSteps List<String>
- List of commands to execute for the job
- projectId Integer
- Project ID to create the job in
- triggers Map<String,Boolean>
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- compareChanges StringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbtVersion String
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferringEnvironment IntegerId 
- Environment identifier that this job defers to (new deferring approach)
- deferringJob IntegerId 
- Job identifier that this job defers to (legacy deferring approach)
- description String
- Description for the job
- errorsOn BooleanLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- generateDocs Boolean
- Flag for whether the job should generate documentation
- isActive Boolean
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- jobCompletion JobTrigger Condition Job Completion Trigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- jobType String
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name String
- Job name
- numThreads Integer
- Number of threads to use in the job
- runCompare BooleanChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- runGenerate BooleanSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- runLint Boolean
- Whether the CI job should lint SQL changes. Defaults to false.
- scheduleCron String
- Custom cron expression for schedule
- scheduleDays List<Integer>
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- scheduleHours List<Integer>
- List of hours to execute the job at if running on a schedule
- scheduleInterval Integer
- Number of hours between job executions if running on a schedule
- scheduleType String
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- selfDeferring Boolean
- Whether this job defers on a previous run of itself
- targetName String
- Target name for the dbt profile
- timeoutSeconds Integer
- Number of seconds to allow the job to run before timing out
- triggersOn BooleanDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- environmentId number
- Environment ID to create the job in
- executeSteps string[]
- List of commands to execute for the job
- projectId number
- Project ID to create the job in
- triggers {[key: string]: boolean}
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- compareChanges stringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbtVersion string
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferringEnvironment numberId 
- Environment identifier that this job defers to (new deferring approach)
- deferringJob numberId 
- Job identifier that this job defers to (legacy deferring approach)
- description string
- Description for the job
- errorsOn booleanLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- generateDocs boolean
- Flag for whether the job should generate documentation
- isActive boolean
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- jobCompletion JobTrigger Condition Job Completion Trigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- jobType string
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name string
- Job name
- numThreads number
- Number of threads to use in the job
- runCompare booleanChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- runGenerate booleanSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- runLint boolean
- Whether the CI job should lint SQL changes. Defaults to false.
- scheduleCron string
- Custom cron expression for schedule
- scheduleDays number[]
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- scheduleHours number[]
- List of hours to execute the job at if running on a schedule
- scheduleInterval number
- Number of hours between job executions if running on a schedule
- scheduleType string
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- selfDeferring boolean
- Whether this job defers on a previous run of itself
- targetName string
- Target name for the dbt profile
- timeoutSeconds number
- Number of seconds to allow the job to run before timing out
- triggersOn booleanDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- environment_id int
- Environment ID to create the job in
- execute_steps Sequence[str]
- List of commands to execute for the job
- project_id int
- Project ID to create the job in
- triggers Mapping[str, bool]
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- compare_changes_ strflags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbt_version str
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferring_environment_ intid 
- Environment identifier that this job defers to (new deferring approach)
- deferring_job_ intid 
- Job identifier that this job defers to (legacy deferring approach)
- description str
- Description for the job
- errors_on_ boollint_ failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- generate_docs bool
- Flag for whether the job should generate documentation
- is_active bool
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- job_completion_ Jobtrigger_ condition Job Completion Trigger Condition Args 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- job_type str
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name str
- Job name
- num_threads int
- Number of threads to use in the job
- run_compare_ boolchanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- run_generate_ boolsources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- run_lint bool
- Whether the CI job should lint SQL changes. Defaults to false.
- schedule_cron str
- Custom cron expression for schedule
- schedule_days Sequence[int]
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- schedule_hours Sequence[int]
- List of hours to execute the job at if running on a schedule
- schedule_interval int
- Number of hours between job executions if running on a schedule
- schedule_type str
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- self_deferring bool
- Whether this job defers on a previous run of itself
- target_name str
- Target name for the dbt profile
- timeout_seconds int
- Number of seconds to allow the job to run before timing out
- triggers_on_ booldraft_ pr 
- Whether the CI job should be automatically triggered on draft PRs
- environmentId Number
- Environment ID to create the job in
- executeSteps List<String>
- List of commands to execute for the job
- projectId Number
- Project ID to create the job in
- triggers Map<Boolean>
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- compareChanges StringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbtVersion String
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferringEnvironment NumberId 
- Environment identifier that this job defers to (new deferring approach)
- deferringJob NumberId 
- Job identifier that this job defers to (legacy deferring approach)
- description String
- Description for the job
- errorsOn BooleanLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- generateDocs Boolean
- Flag for whether the job should generate documentation
- isActive Boolean
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- jobCompletion Property MapTrigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- jobType String
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name String
- Job name
- numThreads Number
- Number of threads to use in the job
- runCompare BooleanChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- runGenerate BooleanSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- runLint Boolean
- Whether the CI job should lint SQL changes. Defaults to false.
- scheduleCron String
- Custom cron expression for schedule
- scheduleDays List<Number>
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- scheduleHours List<Number>
- List of hours to execute the job at if running on a schedule
- scheduleInterval Number
- Number of hours between job executions if running on a schedule
- scheduleType String
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- selfDeferring Boolean
- Whether this job defers on a previous run of itself
- targetName String
- Target name for the dbt profile
- timeoutSeconds Number
- Number of seconds to allow the job to run before timing out
- triggersOn BooleanDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
Outputs
All input properties are implicitly available as output properties. Additionally, the Job resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Job Resource
Get an existing Job 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?: JobState, opts?: CustomResourceOptions): Job@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compare_changes_flags: Optional[str] = None,
        dbt_version: Optional[str] = None,
        deferring_environment_id: Optional[int] = None,
        deferring_job_id: Optional[int] = None,
        description: Optional[str] = None,
        environment_id: Optional[int] = None,
        errors_on_lint_failure: Optional[bool] = None,
        execute_steps: Optional[Sequence[str]] = None,
        generate_docs: Optional[bool] = None,
        is_active: Optional[bool] = None,
        job_completion_trigger_condition: Optional[JobJobCompletionTriggerConditionArgs] = None,
        job_type: Optional[str] = None,
        name: Optional[str] = None,
        num_threads: Optional[int] = None,
        project_id: Optional[int] = None,
        run_compare_changes: Optional[bool] = None,
        run_generate_sources: Optional[bool] = None,
        run_lint: Optional[bool] = None,
        schedule_cron: Optional[str] = None,
        schedule_days: Optional[Sequence[int]] = None,
        schedule_hours: Optional[Sequence[int]] = None,
        schedule_interval: Optional[int] = None,
        schedule_type: Optional[str] = None,
        self_deferring: Optional[bool] = None,
        target_name: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        triggers: Optional[Mapping[str, bool]] = None,
        triggers_on_draft_pr: Optional[bool] = None) -> Jobfunc GetJob(ctx *Context, name string, id IDInput, state *JobState, opts ...ResourceOption) (*Job, error)public static Job Get(string name, Input<string> id, JobState? state, CustomResourceOptions? opts = null)public static Job get(String name, Output<String> id, JobState state, CustomResourceOptions options)resources:  _:    type: dbtcloud:Job    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.
- CompareChanges stringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- CompletionTrigger Pulumi.Condition Dbt Cloud. Inputs. Job Job Completion Trigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- DbtVersion string
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- DeferringEnvironment intId 
- Environment identifier that this job defers to (new deferring approach)
- DeferringJob intId 
- Job identifier that this job defers to (legacy deferring approach)
- Description string
- Description for the job
- EnvironmentId int
- Environment ID to create the job in
- ErrorsOn boolLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- ExecuteSteps List<string>
- List of commands to execute for the job
- GenerateDocs bool
- Flag for whether the job should generate documentation
- IsActive bool
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- JobType string
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- Name string
- Job name
- NumThreads int
- Number of threads to use in the job
- ProjectId int
- Project ID to create the job in
- RunCompare boolChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- RunGenerate boolSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- RunLint bool
- Whether the CI job should lint SQL changes. Defaults to false.
- ScheduleCron string
- Custom cron expression for schedule
- ScheduleDays List<int>
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- ScheduleHours List<int>
- List of hours to execute the job at if running on a schedule
- ScheduleInterval int
- Number of hours between job executions if running on a schedule
- ScheduleType string
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- SelfDeferring bool
- Whether this job defers on a previous run of itself
- TargetName string
- Target name for the dbt profile
- TimeoutSeconds int
- Number of seconds to allow the job to run before timing out
- Triggers Dictionary<string, bool>
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- TriggersOn boolDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- CompareChanges stringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- DbtVersion string
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- DeferringEnvironment intId 
- Environment identifier that this job defers to (new deferring approach)
- DeferringJob intId 
- Job identifier that this job defers to (legacy deferring approach)
- Description string
- Description for the job
- EnvironmentId int
- Environment ID to create the job in
- ErrorsOn boolLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- ExecuteSteps []string
- List of commands to execute for the job
- GenerateDocs bool
- Flag for whether the job should generate documentation
- IsActive bool
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- JobCompletion JobTrigger Condition Job Completion Trigger Condition Args 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- JobType string
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- Name string
- Job name
- NumThreads int
- Number of threads to use in the job
- ProjectId int
- Project ID to create the job in
- RunCompare boolChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- RunGenerate boolSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- RunLint bool
- Whether the CI job should lint SQL changes. Defaults to false.
- ScheduleCron string
- Custom cron expression for schedule
- ScheduleDays []int
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- ScheduleHours []int
- List of hours to execute the job at if running on a schedule
- ScheduleInterval int
- Number of hours between job executions if running on a schedule
- ScheduleType string
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- SelfDeferring bool
- Whether this job defers on a previous run of itself
- TargetName string
- Target name for the dbt profile
- TimeoutSeconds int
- Number of seconds to allow the job to run before timing out
- Triggers map[string]bool
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- TriggersOn boolDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- compareChanges StringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbtVersion String
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferringEnvironment IntegerId 
- Environment identifier that this job defers to (new deferring approach)
- deferringJob IntegerId 
- Job identifier that this job defers to (legacy deferring approach)
- description String
- Description for the job
- environmentId Integer
- Environment ID to create the job in
- errorsOn BooleanLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- executeSteps List<String>
- List of commands to execute for the job
- generateDocs Boolean
- Flag for whether the job should generate documentation
- isActive Boolean
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- jobCompletion JobTrigger Condition Job Completion Trigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- jobType String
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name String
- Job name
- numThreads Integer
- Number of threads to use in the job
- projectId Integer
- Project ID to create the job in
- runCompare BooleanChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- runGenerate BooleanSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- runLint Boolean
- Whether the CI job should lint SQL changes. Defaults to false.
- scheduleCron String
- Custom cron expression for schedule
- scheduleDays List<Integer>
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- scheduleHours List<Integer>
- List of hours to execute the job at if running on a schedule
- scheduleInterval Integer
- Number of hours between job executions if running on a schedule
- scheduleType String
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- selfDeferring Boolean
- Whether this job defers on a previous run of itself
- targetName String
- Target name for the dbt profile
- timeoutSeconds Integer
- Number of seconds to allow the job to run before timing out
- triggers Map<String,Boolean>
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- triggersOn BooleanDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- compareChanges stringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbtVersion string
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferringEnvironment numberId 
- Environment identifier that this job defers to (new deferring approach)
- deferringJob numberId 
- Job identifier that this job defers to (legacy deferring approach)
- description string
- Description for the job
- environmentId number
- Environment ID to create the job in
- errorsOn booleanLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- executeSteps string[]
- List of commands to execute for the job
- generateDocs boolean
- Flag for whether the job should generate documentation
- isActive boolean
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- jobCompletion JobTrigger Condition Job Completion Trigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- jobType string
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name string
- Job name
- numThreads number
- Number of threads to use in the job
- projectId number
- Project ID to create the job in
- runCompare booleanChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- runGenerate booleanSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- runLint boolean
- Whether the CI job should lint SQL changes. Defaults to false.
- scheduleCron string
- Custom cron expression for schedule
- scheduleDays number[]
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- scheduleHours number[]
- List of hours to execute the job at if running on a schedule
- scheduleInterval number
- Number of hours between job executions if running on a schedule
- scheduleType string
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- selfDeferring boolean
- Whether this job defers on a previous run of itself
- targetName string
- Target name for the dbt profile
- timeoutSeconds number
- Number of seconds to allow the job to run before timing out
- triggers {[key: string]: boolean}
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- triggersOn booleanDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
- compare_changes_ strflags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbt_version str
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferring_environment_ intid 
- Environment identifier that this job defers to (new deferring approach)
- deferring_job_ intid 
- Job identifier that this job defers to (legacy deferring approach)
- description str
- Description for the job
- environment_id int
- Environment ID to create the job in
- errors_on_ boollint_ failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- execute_steps Sequence[str]
- List of commands to execute for the job
- generate_docs bool
- Flag for whether the job should generate documentation
- is_active bool
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- job_completion_ Jobtrigger_ condition Job Completion Trigger Condition Args 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- job_type str
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name str
- Job name
- num_threads int
- Number of threads to use in the job
- project_id int
- Project ID to create the job in
- run_compare_ boolchanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- run_generate_ boolsources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- run_lint bool
- Whether the CI job should lint SQL changes. Defaults to false.
- schedule_cron str
- Custom cron expression for schedule
- schedule_days Sequence[int]
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- schedule_hours Sequence[int]
- List of hours to execute the job at if running on a schedule
- schedule_interval int
- Number of hours between job executions if running on a schedule
- schedule_type str
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- self_deferring bool
- Whether this job defers on a previous run of itself
- target_name str
- Target name for the dbt profile
- timeout_seconds int
- Number of seconds to allow the job to run before timing out
- triggers Mapping[str, bool]
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- triggers_on_ booldraft_ pr 
- Whether the CI job should be automatically triggered on draft PRs
- compareChanges StringFlags 
- The model selector for checking changes in the compare changes Advanced CI feature
- dbtVersion String
- Version number of dbt to use in this job, usually in the format 1.2.0-latest rather than core versions
- deferringEnvironment NumberId 
- Environment identifier that this job defers to (new deferring approach)
- deferringJob NumberId 
- Job identifier that this job defers to (legacy deferring approach)
- description String
- Description for the job
- environmentId Number
- Environment ID to create the job in
- errorsOn BooleanLint Failure 
- Whether the CI job should fail when a lint error is found. Only used when run_lintis set totrue. Defaults totrue.
- executeSteps List<String>
- List of commands to execute for the job
- generateDocs Boolean
- Flag for whether the job should generate documentation
- isActive Boolean
- Should always be set to true as setting it to false is the same as creating a job in a deleted state. To create/keep a job in a 'deactivated' state, check the triggersconfig.
- jobCompletion Property MapTrigger Condition 
- Which other job should trigger this job when it finishes, and on which conditions (sometimes referred as 'job chaining').
- jobType String
- Can be used to enforce the job type betwen ci,mergeandscheduled. Without this value the job type is inferred from the triggers configured
- name String
- Job name
- numThreads Number
- Number of threads to use in the job
- projectId Number
- Project ID to create the job in
- runCompare BooleanChanges 
- Whether the CI job should compare data changes introduced by the code changes. Requires deferring_environment_idto be set. (Advanced CI needs to be activated in the dbt Cloud Account Settings first as well)
- runGenerate BooleanSources 
- Flag for whether the job should add a dbt source freshnessstep to the job. The difference between manually adding a step withdbt source freshnessin the job steps or using this flag is that with this flag, a failed freshness will still allow the following steps to run.
- runLint Boolean
- Whether the CI job should lint SQL changes. Defaults to false.
- scheduleCron String
- Custom cron expression for schedule
- scheduleDays List<Number>
- List of days of week as numbers (0 = Sunday, 7 = Saturday) to execute the job at if running on a schedule
- scheduleHours List<Number>
- List of hours to execute the job at if running on a schedule
- scheduleInterval Number
- Number of hours between job executions if running on a schedule
- scheduleType String
- Type of schedule to use, one of everyday/ daysofweek/ customcron
- selfDeferring Boolean
- Whether this job defers on a previous run of itself
- targetName String
- Target name for the dbt profile
- timeoutSeconds Number
- Number of seconds to allow the job to run before timing out
- triggers Map<Boolean>
- Flags for which types of triggers to use, the values are github_webhook,git_provider_webhook,scheduleandon_merge. All flags should be listed and set withtrueorfalse. Whenon_mergeistrue, all the other values must be false.\n\ncustom_branch_onlyused to be allowed but has been deprecated from the API. The jobs will use the custom branch of the environment. Please remove thecustom_branch_onlyfrom your config. \n\nTo create a job in a 'deactivated' state, set all tofalse.
- triggersOn BooleanDraft Pr 
- Whether the CI job should be automatically triggered on draft PRs
Supporting Types
JobJobCompletionTriggerCondition, JobJobCompletionTriggerConditionArgs          
- job_id int
- The ID of the job that would trigger this job after completion.
- project_id int
- The ID of the project where the trigger job is running in.
- statuses Sequence[str]
- List of statuses to trigger the job on. Possible values are success,errorandcanceled.
Import
using import blocks (requires Terraform >= 1.5)
import {
to = dbtcloud_job.my_job
id = “job_id”
}
import {
to = dbtcloud_job.my_job
id = “12345”
}
using the older import command
$ pulumi import dbtcloud:index/job:Job my_job "job_id"
$ pulumi import dbtcloud:index/job:Job my_job 12345
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- dbtcloud pulumi/pulumi-dbtcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the dbtcloudTerraform Provider.
