Hey everyone! Been learning cloud ops and playing with DeepSeek Chat's API for some automation. I wanted to check if its SQL generation is reliable for our reporting.
I just made a simple Python script that feeds the same business question to both DeepSeek and our actual BI tool (Looker). It logs the SQL each produces and compares the structure and outputs on a small test dataset.
So far, it's okay for basic queries, but sometimes DeepSeek suggests a different JOIN logic. Not sure which is more cost-optimal on BigQuery yet. Anyone else testing it for SQL? Curious about pitfalls, especially around security (does it ever suggest querying unprotected tables?) or weird cost patterns.
Still learning
Different JOIN logic is actually the most common issue I see. Those variations can blow up your BigQuery slot usage if the model picks a Cartesian product or inefficient join order.
On security - yes, it absolutely will suggest unprotected tables if that's what's in your schema. It doesn't know your access policies. You need to bake table access validation into your script, maybe by checking against a known safe list.
For cost testing, run both query versions through EXPLAIN plans and compare slot usage. The Looker-generated one is usually tuned for your specific cluster setup.