cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks asset bundles job and pipeline

RyHubb
New Contributor III

Hello, I'm looking to create a job which is linked to a delta live table. 

 

Given the job code like this:

    my_job_name:
      name: thejobname
      schedule:
        quartz_cron_expression: 56 30 12 * * ?
        timezone_id: UTC
        pause_status: UNPAUSED
      tasks:
        - task_key: the-task-name
          pipeline_task:
            pipeline_id: thepipelineuuidhere
            full_refresh: false

Is there a way to just use the pipeline name? In the same yml file, I have the pipeline declared. For now, I've deployed, then copied the ID and pasted it in the yml. But that won't help on a fresh install. Is there some way to dynamically get that ID?

 

I tried just putting the name of the pipeline, but that doesn't work (it can't find the pipeline).

1 ACCEPTED SOLUTION

Accepted Solutions

Yeshwanth
Databricks Employee
Databricks Employee

@RyHubb 

You can specify the variable of the ID and it will be materialized at deploy time. No need to do this yourself. An example is at https://github.com/databricks/bundle-examples/blob/24678f538415ab936e341a04fce207dce91093a8/default_...
 
Let me know if this helps
 

View solution in original post

5 REPLIES 5

Yeshwanth
Databricks Employee
Databricks Employee

Hey @RyHubb 

See the Delta Live Tables API's create pipeline request payload reference: https://docs.databricks.com/api/workspace/pipelines/create

RyHubb
New Contributor III

Yeah, I know how to create a pipeline (I have it defined in the same yaml file), but that doesn't explain how to create a JOB that kicks off a pipeline that is created in the same yaml file. You need the ID of the pipeline to create the job. As far as I know, the ID is generated when you create the pipeline. So how do I reference the pipeline's ID if I don't know what it is?

Yeshwanth
Databricks Employee
Databricks Employee

@RyHubb can you attach the complete yaml file for me to check once?

Yeshwanth
Databricks Employee
Databricks Employee

@RyHubb 

You can specify the variable of the ID and it will be materialized at deploy time. No need to do this yourself. An example is at https://github.com/databricks/bundle-examples/blob/24678f538415ab936e341a04fce207dce91093a8/default_...
 
Let me know if this helps
 

RyHubb
New Contributor III

@Yeshwanth , that worked, thank you. 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group