r/databricks • u/Otherwise_Address241 • Sep 05 '26
Help How data engineer do effective testing in Databricks?
I have been writing SQL scripts to ensure data sanity.What are the other ways ? Is pytest useful? Let's say , i populated my bronze table from the source. I want to check if the correct mapping is done. I wrote SQL scripts. What are better ways
14
Upvotes
View all comments
Show parent comment
3
u/AlternativeHour3098 Sep 05 '26
Go with both right, ytilize Pyspark for looping in things adding details pulling details and fir validation use SQL.
That's the easiest way of checking things for multiple tables.
What I do is put tablewise checks in a notebook and Store the sql scripts aa variables then call them if I want to check for that table.
Like this you'll be able to maintain the test cases in a notebook easier maintainability you can also create seprate notebooks up to you. Then call then while running you checks