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: 

Forum Posts

vk217
by Contributor
  • 5744 Views
  • 3 replies
  • 1 kudos

ModuleNotFoundError: No module named 'pyspark.dbutils'

I have a class in a python file like this from pyspark.sql import SparkSession from pyspark.dbutils import DBUtils class DatabricksUtils: def __init__(self‌‌): self.spark = SparkSession.getActiveSession() self.dbutils = DBUtil...

  • 5744 Views
  • 3 replies
  • 1 kudos
Latest Reply
Jarkrung
New Contributor
  • 1 kudos

Hi, we are also in the same exact situation. Were you able to solve the problem? Or a workaround maybe.

  • 1 kudos
2 More Replies
Gutek
by New Contributor II
  • 895 Views
  • 3 replies
  • 1 kudos

How to import a Lakeview Dashboard programmatically (API or CLI)?

I'm trying to import a Lakeview Dashboard that I've originally exported through the CLI (version 0.213.0). The exported file has extension .lvdash.json and is a single line json file.I can't get it to work, I tried this command: databricks workspace ...

  • 895 Views
  • 3 replies
  • 1 kudos
Latest Reply
miranda_luna_db
Contributor II
  • 1 kudos

Thanks for flagging. There should be enhanced API documentation specific to Lakeview in the next week or two (PR is in review). Keep an eye out for a page called "Use the Lakeview API and Workspace API to create and manage Lakeview dashboards." Curre...

  • 1 kudos
2 More Replies
EdemSeitkh
by New Contributor III
  • 1980 Views
  • 5 replies
  • 0 kudos

Resolved! Pass catalog/schema/table name as a parameter to sql task

Hi, i am trying to pass catalog name as a parameter into query for sql task, and it pastes it with single quotes, which results in error. Is there a way to pass raw value or other possible workarounds? query:INSERT INTO {{ catalog }}.pas.product_snap...

  • 1980 Views
  • 5 replies
  • 0 kudos
Latest Reply
lathaniel
New Contributor III
  • 0 kudos

@EdemSeitkh  can you elaborate on your workaround? Curious how you were able to implement an enum paramter in DBSQL.I'm running into this same issue now.

  • 0 kudos
4 More Replies
amelia1
by New Contributor II
  • 37 Views
  • 1 replies
  • 0 kudos

pyspark read data using jdbc url returns column names only

Hello,I have a remote azure sql warehouse serverless instance that I can access using databricks-sql-connector. I can read/write/update tables no problem.But, I'm also trying to read/write/update tables using local pyspark + jdbc drivers. But when I ...

  • 37 Views
  • 1 replies
  • 0 kudos
Latest Reply
anardinelli
New Contributor II
  • 0 kudos

Hi @amelia1 how are you? What you got was indeed the top 5 rows (see that it was the Row class). What does it show when you run display(df)? I'm thinking it might be something related to your schema, since you did not defined that, it can read the da...

  • 0 kudos
RobinK
by New Contributor III
  • 1757 Views
  • 12 replies
  • 11 kudos

Resolved! Databricks Jobs do not run on job compute but on shared compute

Hello,since last night none of our ETL jobs in Databricks are running anymore, although we have not made any code changes.The identical jobs (deployed with Databricks asset bundles) run on an all-purpose cluster, but fail on a job cluster. We have no...

  • 1757 Views
  • 12 replies
  • 11 kudos
Latest Reply
jcap
Visitor
  • 11 kudos

I do not believe this is solved, similar to a comment over here:https://community.databricks.com/t5/data-engineering/databrickssession-broken-for-15-1/td-p/70585We are also seeing this error in 14.3 LTS from a simple example:from pyspark.sql.function...

  • 11 kudos
11 More Replies
TWib
by New Contributor III
  • 1196 Views
  • 7 replies
  • 3 kudos

DatabricksSession broken for 15.1

This code fails with exception:[NOT_COLUMN_OR_STR] Argument `col` should be a Column or str, got Column.File <command-4420517954891674>, line 7 4 spark = DatabricksSession.builder.getOrCreate() 6 df = spark.read.table("samples.nyctaxi.trips") ---->...

  • 1196 Views
  • 7 replies
  • 3 kudos
Latest Reply
jcap
Visitor
  • 3 kudos

We are also seeing this error in 14.3 LTS from a simple example:from pyspark.sql.functions import coldf = spark.table('things')things = df.select(col('thing_id')).collect()[NOT_COLUMN_OR_STR] Argument `col` should be a Column or str, got Column.  

  • 3 kudos
6 More Replies
shanebo425
by New Contributor II
  • 29 Views
  • 0 replies
  • 0 kudos

Saving Widgets to Git

We use Databricks widgets in our python notebooks to pass parameters in jobs but also for when we are running the notebooks manually (outside of a job context) for various reasons. We're a small team, but I've noticed that when I create a notebook an...

  • 29 Views
  • 0 replies
  • 0 kudos
gianni77
by New Contributor
  • 39542 Views
  • 13 replies
  • 4 kudos

How can I export a result of a SQL query from a databricks notebook?

The "Download CSV" button in the notebook seems to work only for results <=1000 entries. How can I export larger result-sets as CSV?

  • 39542 Views
  • 13 replies
  • 4 kudos
Latest Reply
igorstar
New Contributor III
  • 4 kudos

If you have a large dataset, you might want to export it to a bucket in parquet format from your notebook:%python df = spark.sql("select * from your_table_name") df.write.parquet(your_s3_path) 

  • 4 kudos
12 More Replies
pavel_merkle
by New Contributor II
  • 661 Views
  • 2 replies
  • 0 kudos

Databrikcs SDK - create new job using JSON

Hello,I am trying to create a Job via Databricks SDK. As input, I use the JSON generated via Workflows UI (Worklflows->Jobs->View YAML/JSON->JSON API->Create) generating pavel_job.json. When trying to run SDK function jobs.create asdbk = WorkspaceCli...

  • 661 Views
  • 2 replies
  • 0 kudos
Latest Reply
mhiltner
New Contributor III
  • 0 kudos

Hey there! I have been using Volumes to get the files. It looks like this: dbk = WorkspaceClient(host=args.host, token=args.token, auth_type="pat") file_path = "/Volumes/{{your_catalog}}/{{your_schema}}/json_volumes/sample1.json" content = dbutils.f...

  • 0 kudos
1 More Replies
Mits
by New Contributor II
  • 1239 Views
  • 4 replies
  • 3 kudos

Sending email alerts to non-databricks user

I am trying to send email alerts to a non databricks user. I am using Alerts feature available in SQL. Can someone help me with the steps.Do I first need to first add Notification Destination through Admin settings and then use this newly added desti...

  • 1239 Views
  • 4 replies
  • 3 kudos
Latest Reply
Anonymous
Not applicable
  • 3 kudos

Hi @Mitali Lad​ Thank you for posting your question in our community! We are happy to assist you.To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers yo...

  • 3 kudos
3 More Replies
Phani1
by Valued Contributor
  • 44 Views
  • 1 replies
  • 0 kudos

integrating Azure Databricks with AAD

Hi Team, Could you please provide the details/process for integrating Azure Databricks - Unity Catalog and AAD? Regards,Phani

  • 44 Views
  • 1 replies
  • 0 kudos
Latest Reply
raphaelblg
Contributor III
  • 0 kudos

Hello @Phani1 ,These doc pages might be useful for you: Set up and manage Unity CatalogSync users and groups from Microsoft Entra ID 

  • 0 kudos
Labels
Top Kudoed Authors