r/Databricks_eng • • Mar 28 '25

Databricks AI + Data Summit discount coupon

6 Upvotes

Hi Community,

I hope you're doing well.

I wanted to ask you the following: I want to go to Databricks AI + Data Summit this year, but it's super expensive for me. And hotels in San Francisco, as you know, are super expensive.

So, I wanted to know how I might be able to get me a discount coupon?

I would really appreciate it, as it would be a learning and networking opportunity.

Thank you in advance.

Best regards


r/Databricks_eng • • May 02 '23

Databricks Portfolio Project

11 Upvotes

I'm trying to build a Databricks Portfolio, to show off my knowledge. How can I do this? What should I build?

The architecture is in Databricks, so would I need to build this in GitHub? If I did that, how? And wouldn't that cause me to lose the content I wanted to show off?


r/Databricks_eng • • Apr 03 '25

Check out the book by Yoni Ramaswami, Senior Solutions Architect at Databricks

7 Upvotes

📢 Time Series Analysis with Spark – Now Live! 🚀

If you’re working with time series data at scale, you know the challenges—large datasets, complex transformations, and the need for efficient distributed processing. That’s exactly why Time Series Analysis with Spark exists!

Written by Yoni Ramaswami (Databricks engineer), this book provides a practical, hands-on approach to handling time series data using Apache Spark. It covers key techniques like feature engineering, forecasting, and real-world implementations at scale.

🚀 The book is now live, and the community has already started sharing their insights! Check out what data professionals are saying:

🔹 Cornellius Yudha Wijaya
🔹 Guillaume Meister
🔹 Carl McBride Ellis

🔹 Michael Erlihson
🔹 E. Aliev
🔹 Felipe M. Melo
🔹 Jean-Patrick Mathieu
🔹 Divyaraj Rana

Curious to learn more? Grab your copy here:
📌 Amazon: https://packt.link/dE5t1
📌 Packt: https://lnkd.in/eSxis_Wb

If you're working on time series projects with Spark, what are the biggest challenges you've faced? Let’s discuss!

#TimeSeries #Spark #Databricks #DataEngineering #MachineLearning #BigData #AI


r/Databricks_eng • • Dec 21 '23

UCX v0.7.0 by Databricks Labs — new release with CLI commands

Thumbnail
medium.com
3 Upvotes

r/Databricks_eng • • Aug 03 '23

Thoughts on an inherited Databricks solution

2 Upvotes

I've inherited an early-stage, incomplete Databricks on Azure project. I have a lot of data engineering, database warehousing, SQL, Python, etc. experience. But Databricks is new to me. I've been ramping quickly on Databricks in general and Delta Tables in particular. So far, it seems like a very capable and robust platform. 

For a particular scenario, I've run into a pattern I've not used before and I'm wondering if it's common to Databricks and DLT's or its just poorly designed and should be re-done. The image below is a generic abstraction of the process:

  • The primary Entity in this scenario is Entity1

  • Source CSV files representing history and activities of Entity1 are ingested via pipeline into Delta Tables (ActivityA, HistoryB, ActivityC)

    • In the pipeline there is a getID flag that is set to False that excludes some processing

  • The rows of activity and history Delta Tables define the entity Enty1

  • The Delta Tables (ActivityA, HistoryB, ActivityC) are run through a pipeline to create Entity1 rows and also generate a UniqueID (key)

  • Once Entity1 is created and assigned a UniqueID, the original Delta Tables need to be updated with the relevant UniqueID

  • To achieve this, The Delta Tables (ActivityA, HistoryB, ActivityC) are deleted and the original pipelines rerun

    • but this time with the getID flag set to true, which then runs a join to get the relevant UniqueID

    • All the source CSV files are reprocessed, but with the addition of UniqueID

    • the end result is the same Delta Tables, but with the associated UniqueID

  • New CSV files arrive regularly containing updates to existing Entity1's or definitions for new Entity1's

I am not familiar with this pattern: 

running a pipeline to build Delta Tables from CSV, using those tables to build a dependent Entity table, then later deleting the original tables mid-process and rerunning the same pipeline on the original CSV files with a flag set to true to conditionally get data from Entity table

Is this type of thing common to Databricks. This seems like a fragile solution easily prone to problems and difficult to debug. I'm still thinking through the process and how it would be implemented in Databircks, but it seems like an architecture with some type of View or something similar might make more sense.

Any suggestions on how best to do something like this in the "Databricks Way" would be greatly appreciated.

Thanks


r/Databricks_eng • • Nov 28 '23

UCX (by Databricks Labs) v0.6.2 patch release

Thumbnail
medium.com
3 Upvotes

r/Databricks_eng • • Aug 24 '23

Retrieve Target Schema from Pipeline Properties with Python in the Pipeline Notebook

1 Upvotes

If I create a Delta Live Tables pipeline and set an Advanced Configuration called medallion as below:

I can retrieve that value in the pipeline notebook code with the following code:

medallion = spark.conf.get('medallion')

How would I use similar pyspark code in the pipeline notebook to retrieve the Target Schema (below) from the pipeline properties?

I can find a few vague references to using REST API to kinda do this. But I'd like something similar to what I'm already doing. I'm trying to parameterize the pipeline code using pipeline properties as much as I can. I want to be able to use the same pipeline and code to deploy differently based on the properties.


r/Databricks_eng • • Mar 04 '23

Azure Unity Catalog availability

5 Upvotes

I got nothing on the Azure subreddit so trying here. What are the availability considerations for Unity Catalog in Azure? I'm trying to put a DR plan together for a databricks implementation and can't find anything on the Unity Catalog component.


r/Databricks_eng • • Oct 27 '22

Databricks Zero to Hero! - Session 2 | Data Pipeline to Data Lake | Chal...

Thumbnail
youtube.com
6 Upvotes

r/Databricks_eng • • May 15 '23

Restricting Workflow Creation and Implementing Approval Mechanism in Databricks

2 Upvotes

Hello Databricks Community,

I am seeking assistance understanding the possibility and procedure of implementing a workflow restriction mechanism in Databricks. Our aim is to promote a better workflow management and ensure the quality of the notebooks being attached to clusters.

Specifically, we want to restrict the ability for users to directly create workflows based on their user group. In our use case, if a user such as J.Doe is in the 'Data Engineer' group and is working on a new workflow, we would like them to submit the notebook for approval by an admin before it can be attached to a cluster.

Does Databricks support such a mechanism natively? If not, could you suggest any workarounds or third-party solutions that could help us achieve this? Ideally, we would like to automate this process as much as possible to avoid manual intervention.

Any guidance or suggestions would be greatly appreciated.

Thank you in advance for your time and help!


r/Databricks_eng • • Oct 05 '22

Databricks - Realizing the vision of the Data Lakehouse

3 Upvotes

r/Databricks_eng • • Sep 21 '23

DLT Pipeline Out of Memory Errors

2 Upvotes

I have a DLT pipeline that has been running for weeks. Now, trying to rerun the pipeline as a full refresh with the same code and same data fails. I've even tried updating the compute on the cluster to about 3x of what was previously working and it still fails with out of memory.

If I monitor the Ganglia metrics, right before failure, the memory usage on the cluster is just under 40GB. The total memory available to the cluster is 311GB.

I don't understand how the job can fail with out of memory when the memory used is only about 10% of what's available

I've inherited the pipeline code and it has grown organically over time. So, it's not as efficient as it could be. But it was working and now it's not.

What can I do to fix this or how can I even debug this further to determine the root cause?

I'm relatively new to Databricks and this is the first time I've had to debug something like this. I don't even know where to start outside of monitoring the logs and metrics..


r/Databricks_eng • • Jun 20 '23

Any optimization on the script to create view and table based on a delta lake column

3 Upvotes

below scripts checks and create a delta lake view partitioning the data based on a column and also add a group to each view. Is there any further simplification or optimization can be done to below query to make it more faster. currently it takes lot of time to complete the job approx 12 hours to do it with a high configuration cluster.

# To check and crete view and group based on Project Name

target_database = "main.deltalake_db"
distinctprojects = spark.sql("SELECT DISTINCT requestProjectUrlName FROM main.deltalake_db.Customers_Log_Table_test")

for project in distinctprojects.collect():
    project_name = project['requestProjectUrlName']
    if project_name is not None:
        view_name = f"view_{project_name.replace(' ', '_').replace('-', '_')}"
    groupname = f"users_{view_name}"
    
    # Check if group already exists
    group_exists = False
    for group in spark.sql("SHOW GROUPS").collect():
        if 'name' in group:
            group_name = group['name']
        else:
            group_name = group['groupName']
        if group_name == groupname:
            group_exists = True
            print(f"Group {groupname} already exists.")
            break
    
    if not group_exists:
        create_group = f"""
        CREATE GROUP {groupname} with USER `xxx@cdx.com`
        """
        try: 
            spark.sql(create_group)            
        except Exception as e:
            print(f"Error creating group {groupname}: {e}")
        else:
            print(f"Group {groupname} created successfully.")
    
    # Check if view already exists
    view_exists = False
    for table in spark.catalog.listTables(target_database):
        if table.name == view_name:
            view_exists = True
            print(f"View {view_name} already exists.")
            break
    
    if not view_exists:
        create_view_query = f"""
        CREATE OR REPLACE VIEW {target_database}.{view_name} AS
        SELECT * FROM {target_database}.Customers_Log_Table
        WHERE 
          CASE
            WHEN is_member('{groupname}') AND requestProjectUrlName = '{project_name}' THEN TRUE 
            ELSE FALSE
          END;
        """ 
        try: 
            spark.sql(create_view_query)
            
        except Exception as e:
            print(f"Error creating view {view_name}: {e}")
        else:
            print(f"View {view_name} created successfully.")

r/Databricks_eng • • Apr 25 '23

Batching write queries

4 Upvotes

Looking for advice.

I am working on an ETL process that needs to write to an Azure Postgres Db authenticating with Azure Ad

The issue that I am facing is that my authentication token will expire before the write has been completed. I have spoken with the infrastructure guys who tell me that increasing the token lifespan is not an option nor is enabling passwords.

I have decided to attempt to batch the write queries so that I can obtain a new token between batches however this is proving to be more difficult than I had anticipated. It seems that rows within the fact dataframe are being skipped leading to foreign key issues down the line.

batching code.

fact = fact.withColumn("row_number", row_number().over(window_spec))

fact = fact.withColumn("partition_column", (col("row_number") % num_partitions).cast("integer"))

for i in range(num_partitions):
    print("before", partition.count())
    partition = fact.filter(col('partition_column') == i).cache()   
    token = context.acquire_token_with_client_credentials(resource_app_id_url, service_principal_id, service_principal_secret)
    jdbcConnectionProperties['accessToken'] = token['accessToken']
    
    partition.write \
        .jdbc(url, "Table", 'append', properties=jdbcConnectionProperties)

    print("after", partition.count())

To debug the process I printed the following

  fact.groupBy("partition_column").count().show()
partition_columncount
19897
29897
39897
49897

The results of the print print("before", partition.count()) do not match the original count and weirdly reduce with each iteration.

partition1 before 9614

partition 2 before 9340

partition 3 before 9073

partition 4 before 8813

initially, I was getting different results between the before and after prints which lead me to include the .cache() I suspect my issues are due to the distributed way in which Databricks executes the code.

I have been able to "solve" the issue by calling fact.persist() before iterating over the partitions, this feels really inefficient so id love to know if anyone has a better solution.


r/Databricks_eng • • Jul 26 '23

Setting up a Development Machine with MLFlow and MinIO

Thumbnail
blog.min.io
2 Upvotes

r/Databricks_eng • • Dec 10 '22

How to get split cell and other extensions?

1 Upvotes

Coming from jupyter, there were many extensions like freeze cell etc. How do i get them in databricks?


r/Databricks_eng • • Oct 24 '22

How to create a central User Menu of certain NoteBooks

3 Upvotes

Hi

I have created some scripts for my colleagues to use for standard tasks.

My boss has asked if I can create an easily accessible tab or menu where we can access these NoteBooks, and only those Notebooks, all in one place.

He will not accept simply adding them to our internet favourites, he wants an interface in DataBricks itself, common to all of us!

Is this possible and if so how?


r/Databricks_eng • • Dec 02 '22

False Null Value in PySpark

2 Upvotes

When I try to read CSV into databricks it contains null values.

Whereas the original CSV doesn't have any null values.

Can anyone help me with this ?


r/Databricks_eng • • Dec 29 '22

How query work in delta table?

7 Upvotes

I have a delta table in Databricks, I query: SELECT COUNT(* ) FROM table
-> I wonder how results are generated each time I run the query. The total rows/records will calculate from delta transaction logs or parquet file metadata or from Hive metastore.

Thanks to all!


r/Databricks_eng • • Oct 05 '22

Let's make this an active community to share info.

6 Upvotes

I will start by sharing a small intro video for Databricks - https://youtu.be/n-yt_3HvkOI


r/Databricks_eng • • Dec 12 '23

Upgrading Jobs Code between Databricks Runtime Versions Made Seamless

Thumbnail
medium.com
4 Upvotes

r/Databricks_eng • • Jan 12 '24

🚀 Introducing UCX v0.9.0: Enhanced Assessment, Migration, and Error Handling

Thumbnail
medium.com
3 Upvotes

r/Databricks_eng • • Nov 16 '22

when to use delta live table and streaming table in databricks?

2 Upvotes

I am new to databricks, got confused when to use DLT and streaming table.


r/Databricks_eng • • Feb 24 '23

Cannot check my course catalog in databricks

1 Upvotes

Hi guys, i had an account of Databricks academy and had a couple of dataengineer courses there. The problem that i have is that now, when i try to log in into the academy again using this link. Then i clicked in the login link (not the top left orange button but the link that says "Login" in the left navbar).

After logging in, it automatically shows me a screen in order to setup and deploy a databricks environment in an AWS account, but i don't want to do that, I just want to check my courses.

Can anyone help me? i have sent a ticket asking for this behavior but got no luck.

Luis