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:ย 

Issue in "Build a Declarative Pipeline with Spark Declarative Pipelines"

seanpmcn
Visitor

I am trying to complete the "Get Started with Data Engineering" course, but I have been running into an issue.

I have gotten to this step in "Build a Declarative Pipeline with Spark Declarative Pipelines":

Demo: Create and Run the Pipeline

Now you'll configure an ETL Pipeline in the Databricks UI that uses this notebook as its source.

Follow these steps:

  1. In the left sidebar, click Jobs & Pipelines (right-click โ†’ open in a new tab so you can refer back to these instructions)
  2. Click Create and select ETL Pipeline
  3. Give your pipeline a name (e.g., yourname-sdp-bronze-silver-gold)
  4. Under Source code, click Browse and navigate to this notebook:
    • Find your project folder โ†’ select 08 - Build a Declarative Pipeline with Spark Declarative Pipelines
  5. Under Destination, set:
    • Catalog: dbacademy
    • Schema: get_started_de
  6. Under Compute, confirm Serverless is selected
  7. Click Create

 

The problem is that the UI doesn't match the steps. Clicking "Create" automatically creates an empty pipeline, which is fine, but there doesn't seem to be anywhere to select source code.

Is there a workaround for this?

1 ACCEPTED SOLUTION

Accepted Solutions

seanpmcn
Visitor

I have added the source now. I went to the root folder > Create pipeline asset > New pipeline source code folder. I was then able to go to the right of the pipeline name at the top of the screen and edit the catalogue and schema.

However, after running the pipeline, I received the error in the screenshot attached.

Reviewing the warning below the error, I believe I may just need to change the language from python to SQL and remove %sql from the code.

I will report back whether that works.

View solution in original post

3 REPLIES 3

seanpmcn
Visitor

I have added the source now. I went to the root folder > Create pipeline asset > New pipeline source code folder. I was then able to go to the right of the pipeline name at the top of the screen and edit the catalogue and schema.

However, after running the pipeline, I received the error in the screenshot attached.

Reviewing the warning below the error, I believe I may just need to change the language from python to SQL and remove %sql from the code.

I will report back whether that works.

It worked!

Khasim_1
New Contributor II

Hi seanpmcn,

Great job troubleshooting that! It is very common for the UI steps in training documentation to occasionally lag behind the platform's rapid evolution, and you navigated that perfectly by exploring the "Create pipeline asset" workflow.

Your experience with the language syntax error is a perfect example of how declarative pipelines (like DLT/SDP) require strict environment settings compared to interactive notebooks. When a pipeline is configured for SQL, the engine expects pure SQL execution, and the inclusion of %sql magic commands (which are meant for interactive Python/notebook shells) will naturally trigger an error.

Architectโ€™s Pro-Tip: When moving from interactive development (using %sql or %python cells) to declarative production (pipelines), I always recommend cleaning up the code into pure language-specific files or standard notebooks. It not only avoids these execution errors but also makes your code much more compatible with Databricks Asset Bundles (DABs) for CI/CD later on.

Itโ€™s great that you shared the solutionโ€”this will definitely save the next person.

Data Architect | 13 Years Domain Expertise | Databricks SA Champion Cohort