# sql-machine-learning/sqlflow

Brings SQL and AI together.

Repository: https://github.com/sql-machine-learning/sqlflow
Canonical: https://ross.abutalabs.com/products/sqlflow
Homepage: https://sqlflow.org
Language: Go
License: Apache-2.0
License Family: permissive
Topics: sqlflow, sql-syntax, ai, transpiler, deep-learning, databases, machine-learning
Last push: 2024-04-18T08:08:51+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2890, "days_push": 867, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5188, forks 704 (observed 2026-08-28T04:09:11.892246+00:00)

## What it is
SQLFlow is a compiler that extends SQL with AI-oriented syntax (training, prediction, evaluation, explanation, and mathematical programming) and compiles SQL programs into Argo workflows that run on Kubernetes. It connects to databases such as MySQL, MariaDB, TiDB, Hive, and MaxCompute and generates jobs for machine learning toolkits like TensorFlow, Keras, and XGBoost.

## Use cases
- train machine learning models directly from SQL statements
- run predictions and scoring queries without writing Python
- compile SQL programs into Kubernetes workflows
- evaluate and explain ML models using SQL
- let SQL-skilled analysts build TensorFlow or XGBoost models
- run AI jobs against data in MySQL, Hive, TiDB, or MaxCompute

## When to choose
- your team knows SQL but not Python and needs to train or apply ML models
- your data lives in a supported database and you want in-database ML workflows
- you already run Kubernetes and want ML jobs orchestrated as Argo workflows
- you want a unified SQL interface for training, inference, and model explanation

## When to avoid
- you need fine-grained programmatic control over ML pipelines in Python
- you have no Kubernetes cluster, since workflow execution depends on Argo on K8s
- you need a tool with heavy ongoing development and cutting-edge ML features
- you only need plain analytics queries that standard SQL engines already handle

## Facets
- artifact type: application
- maturity: maintenance
- function: compiler, parser, machine-learning, deep-learning, data-science, workflow-automation
- domain: machine-learning, deep-learning, databases, data-science, big-data, compilers, cloud-computing
- platform: go, cloud, self-hosted
- tags: sql, transpiler, extended-sql, argo-workflows, tensorflow, keras, xgboost, shap, model-training, mysql, hive, maxcompute, tidb, mathematical-programming, kubernetes, docker, linux

## Member repositories
- sql-machine-learning/sqlflow (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:11.892246+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:01:46.542374+00:00, confidence not recorded.
  - readme: https://github.com/sql-machine-learning/sqlflow (fetched 2026-08-28T04:09:11.892246+00:00, sha 9965f5e2c87d)
  - homepage: https://sqlflow.org (fetched 2026-08-29T08:55:34.099320+00:00, sha 2ebd4756ba96)
- Data as of 2026-08-30T08:39:29.467469+00:00.
