- Notifications
You must be signed in to change notification settings - Fork474
Real-time Data Integration and Transformation: use SQL to transform, deliver, and act on fast-changing data.
License
MaterializeInc/materialize
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Materialize is a real-time data integration platform that creates and continually updates consistent views of transactional data from across your organization. Its SQL interface democratizes the ability to serve and access live data. Materialize can be deployed anywhere your infrastructure runs.
Use Materialize to do things like deliver fresh context for AI/RAG pipelines, power operational dashboards, and create more dynamic customer experiences without building time-consuming custom data pipelines.
The three most common patterns for adopting Materialize are the following:
- Query Offload (CQRS) - Scale complex read queries more efficiently than a read replica, and without the headaches of cache invalidation.
- Integration Hub (ODS) - Extract, load, and incrementally transform data from multiple sources. Create live views of your data that can be queried directly or pushed downstream.
- Operational Data Mesh (ODM) - Use SQL to create and deliver real-time, strongly consistent data products to streamline coordination across services and domains.
Ready to try out Materialize? You cansign up for a free cloud trial ordownload our community edition, which is free forever for deployments using less than 24 GiB of memory and 48 GiB of disk!
Have questions? We'd love to hear from you:
Materialize focuses on providing correct andconsistent answers with minimal latency, and does not ask you to accept either approximate answers or eventual consistency. This guarantee holds even when joining data frommultiple upstream systems. Whenever Materialize answers a query, that answer is the correct result on some specific (and recent) version of your data. Materialize does all of this by recasting your SQL queries asdataflows, which can react efficiently to changes in your data as they happen.
Our fully managed service is cloud-native, featuringhigh availability through multi-active replication,horizontal scalability by seamlessly scaling dataflows across multiple machines, andnear-infinite storage by leveraging cloud object storage (e.g., Amazon S3). You can self-manage Materialize using our Enterprise or Community editions.
We support a large fraction of PostgreSQL features and are actively expanding support for more built-in PostgreSQL functions. Please file an issue if you have an idea for an improvement!
Materialize can read data directly from aPostgreSQL orMySQL replication stream, fromKafka (and other Kafka API-compatible systems likeRedpanda), or from SaaS applicationsvia webhooks.
Once you've got the data in, define views and perform reads via the PostgreSQL protocol. Use your favorite SQL client, including thepsql
you probably already have on your system. Customers using Materialize in production tend to usedbt Core.
Materialize supports a comprehensive variety of SQL features, all using the PostgreSQL dialect and protocol:
- Joins, joins, joins! Materialize supports multi-column join conditions, multi-way joins, self-joins, cross-joins, inner joins, outer joins, etc.
- Delta-joins avoid intermediate state blowup compared to systems that can only plan nested binary joins - tested on joins of up to 64 relations.
- Support for subqueries. Materialize's SQL optimizer performs subquery decorrelation out-of-the-box, avoiding the need to manually rewrite subqueries into joins.
- Materialize can incrementally maintain views in the presence of arbitrary inserts, updates, and deletes. No asterisks.
- All the aggregations:
min
,max
,count
,sum
,stddev
, etc. HAVING
ORDER BY
LIMIT
DISTINCT
- JSON support in the PostgreSQL dialect including operators and functions like
->
,->>
,@>
,?
,jsonb_array_element
,jsonb_each
. Materialize automatically plans lateral joins for efficientjsonb_each
support. - Nest views on views on views!
- Multiple views that have overlapping subplans can share underlying indices for space and compute efficiency, so just declaratively definewhat you want, and we'll worry about how to efficiently maintain them.
We’ve also extended our SQL support to enablerecursion that supports incrementally updating tree and graph structures.
Here's an example join query that works fine in Materialize,TPC-H
query 15:
CREATE SOURCE tpchFROM LOAD GENERATOR TPCH (SCALE FACTOR1) FOR ALL TABLES;-- Views define commonly reused subqueries.CREATEVIEWrevenue (supplier_no, total_revenue)ASSELECT l_suppkey,SUM(l_extendedprice* (1- l_discount))FROM lineitemWHERE l_shipdate>=DATE'1996-01-01'AND l_shipdate<DATE'1996-01-01'+ INTERVAL'3' monthGROUP BY l_suppkey;-- The MATERIALIZED keyword is the trigger to begin-- eagerly, consistently, and incrementally maintaining-- results that are stored directly in durable storage.CREATE MATERIALIZED VIEW tpch_q15ASSELECT s_suppkey, s_name, s_address, s_phone, total_revenueFROM supplier, revenueWHERE s_suppkey= supplier_noAND total_revenue= (SELECTmax(total_revenue)FROM revenue )ORDER BY s_suppkey;-- Creating an index keeps results always up to date and in memory.-- In this example, the index will allow for fast point lookups of-- individual supply keys.CREATEINDEXtpch_q15_idxON tpch_q15 (s_suppkey);
Stream inserts, updates, and deletes on the underlying tables (lineitem
andsupplier
), and Materialize keeps the materialized view incrementally updated. You can typeSELECT * FROM tpch_q15
and expect to see the current results immediately!
Pull based: Use any PostgreSQL-compatible driver in any language/environment to makeSELECT
queries against your views. Tell them they're talking to a PostgreSQL database, they don't ever need to know otherwise. This is particularly helpful for pointing services and BI tools directly at Materialize.
Push based: Listen to changes directly usingSUBSCRIBE
or configure Materialize to stream results to a Kafka topic as soon as the views change. You can also copy updates to object storage.
Check outour documentation.
Materialize is provided as a self-managed product and a fully managed cloud service withcredit-based pricing. Included in the priceare proprietary cloud-native features like horizontal scalability, highavailability, and a web management console.
We're big believers in advancing the frontier of human knowledge. Tothat end, the source code of the standalone database engine is publiclyavailable, in this repository, andlicensed under the BSL 1.1,converting to the open-source Apache 2.0 license after 4 years. As stated in theBSL, use of the standalone database engine on a single node is free forever.
Materialize depends upon many open source Rust crates. We maintain alist ofthese crates and their licenses,including links to their source repositories.
Materialize is primarily written in Rust.
Developers can find docs atdoc/developer, and Rust API documentation is hosted athttps://dev.materialize.com/api/rust/.
Contributions are welcome. Prospective code contributors might find theD-goodfor externalcontributorsdiscussion label useful. SeeCONTRIBUTING.mdfor additional guidance.
Materialize is lovingly crafted bya team of developers and one bot.Join us.
About
Real-time Data Integration and Transformation: use SQL to transform, deliver, and act on fast-changing data.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.