question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I'm not able to run code developed using dbt directly in Databricks.

See original GitHub issue

Describe the bug

I’m not able to run code developed using dbt directly in Databricks.

I’m trying to configure a CI/CD process using Databricks jobs to automatically run the SQL codes. We usually do this using Airflow and this is the first time we are configuring it directly in Databricks. However, when trying to connect, DBT (or Python, I don’t know) gives an error that it doesn’t have the logs function.

Steps To Reproduce

  1. Create a venv with Python 3.8.10 py -m venv venv source venv/Scripts/activate

In this case, I’m on Windows 10, but I don’t think it will impact the next steps for reprodute.

  1. Install and upgrade dbt-databricks

pip install dbt-databricks pip install --upgrade dbt-databricks

image

  1. Generate a dummy project

dbt init jaffle_shop

  1. Check if connection is working

dbt debug image

  1. Commit all changes in a repository test

  2. Add repository in Repos Databricks and give a pull refresh

  3. Create a notebook in same diretory for test

  4. Install requirements and debug dbt In this case, we have only dbt-databricks to install

%pip install dbt-databricks %sh dbt --version image

%sh dbt debug

image

Expected behavior

The expected result of dbt debug is the connection indicator working. Like this: image

Screenshots and log output

If applicable, add screenshots or log output to help explain your problem.

System information

The output of dbt --version: image

Additional context

We tried to install another version of dbt-databricks, but every time we try, the installed version always comes 1.0.4, as if it didn’t obey the command directed.

As happen in this case: image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

3reactions
bilalaslamseattlecommented, May 19, 2022

@ac-garcia @binhnefits @guizsantos I’m going to set up a “drop in” demo for next week. I’d love to get your feedback on the experience and, if you like it, we can enroll you in the preview right there.

Here are some times you can drop by next week:

EMEA-friendly time: Monday, May 23 at 15.00 CET. Google Meet link: https://meet.google.com/zzc-qpvo-vrn North America-friendly time: Tuesday, May 24 at 10.00 PT. Google Meet link: https://meet.google.com/zee-bdcj-eak

Looking forward to seeing you there!

2reactions
bilalaslamseattlecommented, Apr 22, 2022

@ac-garcia thanks for opening the issue. If you are trying to run a dbt project as a job, we are actually previewing this capability right now. Would you be interested in trying it out? Then there’s no need to run a notebook.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connect to dbt Core | Databricks on AWS
Learn how to connect your Databricks workspace to dbt Core, an open-source command line tool that enables data teams to transform data.
Read more >
Set up and connect Databricks - dbt Developer Hub
Click Develop from the upper left. · Above the file tree to the left, click Initialize your project. · Make your initial commit...
Read more >
Use dbt in an Azure Databricks job - Microsoft Learn
Development and production workflow ... Databricks recommends developing your dbt projects against a Databricks SQL warehouse. Using a Databricks ...
Read more >
Getting Started with dbt Core and Databricks - YouTube
In part 2, you will set up dbt Core in a Github repository and run your first dbt command in the cloud. The...
Read more >
Building Your First dbt Project on Databricks - SelectFrom
Install dbt and use it inside a Python virtual environment; Create a dbt project and connect to a Databricks SQL warehouse; Develop dbt...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found