Malloy is an experimental language for describing data relationships and transformations. It is an analytical language that runs on SQL databases. It provides the ability to define a semantic data model and query it. Malloy currently works with SQL databases BigQuery, Postgres, and querying Parquet and CSV via DuckDB.
Queries compile to SQL, optimized for your database.
Has both a semantic data model and a query language. The semantic model contains reusable calculations and definitions, making queries short and readable.
Excels at reading and writing nested data sets.
Things that are complicated in SQL are simple to express in Malloy. For example: level of detail calculations, percent of total, aggregating against multiple tables across a join safely, date operations, reasonable ordering by default, and more.
Malloy is a work in progress. Malloy is designed to be a language for anyone who works with SQL--whether you’re an analyst, data scientist, data engineer, or someone building a data application. If you know SQL, Malloy will feel familiar, while more powerful and efficient. Malloy allows you to model as you go, so there is no heavy up-front work before you can start answering complex questions, and you're never held back or restricted by the model.
Write Malloy in the Visual Studio Code extension: build semantic data models, query and transform data, and create simple visualizations and dashboards.
Explore data with the Malloy Composer, a demo of a data exploration application built on top of Malloy
Join our Slack community.
File feature requests/bugs, join discussions, or contribute to Malloy on our Github repository.
Malloy was designed by a team of people with a lot of experience in understanding the task of extracting meaning from data. Years of constant exposure to SQL resulted in a tremendous sense of wonder at the power of SQL ... and a tremendous source of frustration at how bad SQL is at representing the types of operations needed to get meaningful data out of relational databases, and how difficult it is to maintain and extend a complex set of transformations written in SQL.
Malloy started as a "clean slate" thought experiment, if we knew all the things we know about data, and about programming with data, and about programming languages in general, and we were designing a query language today, what would it look like.