I’ve heard about "BigQuery ML" and "Snowflake Cortex." Can I actually write a SQL query to predict customer churn without exporting my data to Python or R? How accurate are these SQL-based models compared to traditional Scikit-learn approaches?
3 answers
Yes, in-database ML is the biggest trend for 2025. With BigQuery ML, you can literally write CREATE MODEL ... OPTIONS(model_type='logistic_reg') AS SELECT .... The accuracy is surprisingly comparable to Scikit-learn because, under the hood, these platforms are using the same algorithms. The massive advantage is data gravity—you don't have to move 5TB of data to a notebook. In my last project, we deployed a churn model entirely in SQL, which allowed our analysts to refresh predictions every hour without any Python scripts.
Are you worried about the lack of fine-tuning options in SQL, or is the ease of deployment more important for your current business use case?
It's great for 80% of use cases. If you need a simple regression or classification, SQL is faster. If you need a custom deep learning architecture, stick to Python.
Well said, Martha. It’s all about the right tool for the job. For most business reporting, "good enough" SQL ML is a game changer.
Deployment is definitely the priority. We don't have a dedicated MLOps team, so if our Data Analysts can deploy models using just SQL, it saves us months of work. However, I am curious about feature engineering. Can I do things like One-Hot Encoding or scaling directly in the TRANSFORM clause of the SQL model creation, or should that be handled in a separate view first?