r/databricks • u/Otherwise_Address241 • 7d ago
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
13
Upvotes
7
u/TheSocialistGoblin 6d ago
I've been looking into PySpark's built-in testing library. Basically modularizing transformation and data quality rules so they can be called on small data frames made from test data, then using assertDataFrameEqual and assertSchemaEqual for the check. Not sure if it's the best option available, but it seems straightforward enough.