You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redis SQL Trino is a SQL interface for <a href='https://redis.io/docs/stack/'>Redis Stack</a>, <a href='https://redis.com/redis-enterprise-cloud/overview/'>Redis Cloud</a>, and <a href='https://redis.com/redis-enterprise-software/overview/'>Redis Enterprise</a>.
Redis SQL is a https://trino.io[Trino] connector and SQL interface for https://redis.io/docs/stack/[Redis Stack], https://redis.com/redis-enterprise-cloud/overview/[Redis Cloud], and https://redis.com/redis-enterprise-software/overview/[Redis Enterprise].
24
+
Redis SQL Trino lets lets you easily integrate with visualization frameworks — like Tableau and SuperSet — and platforms that support JDBC-compatible databases (e.g., Mulesoft). Query support includes SELECT statements across secondary indexes on both Redis hashes & JSON, aggregations (e.g., count, min, max, avg), ordering, and more.
15
25
16
-
Trino is a distributed SQL engine designed to efficiently query large amounts of data for data warehousing and analytics (OLAP) applications. The Redis SQL Trino connector lets you use Trino to query your Redis data using SQL. This implementation takes advantage of the indexing and querying capabilites of Redis Stack. As such, this connector generally outperforms the https://trino.io/docs/current/connector/redis.html[standard Redis Trino connector], which cannot take advantage of these indexed queries.
26
+
Trino is a distributed SQL engine designed to query large data sets across one or more heterogeneous data sources. Though Trino does support a https://trino.io/docs/current/connector/redis.html[Redis OSS connector], this connector is limited to SCAN and subsequent HGET operations, which do not scale well in high-throughput scenarios. However, that is where Redis SQL Trino shines since it can pushdown the entire query to the data atomically which eliminates the waste of many network hops and subsequent operations.
17
27
18
28
== Table of Contents
19
29
@@ -26,13 +36,13 @@ Trino is a distributed SQL engine designed to efficiently query large amounts of
26
36
27
37
== Background
28
38
29
-
Redis is an in-memory data store designed to serve data with the fastest possible response times. For this reason, Redis is frequently used for caching OLTP-style application queries. Redis Stack is an extension to Redis that, among other things, lets you index your data and then efficiently query it using a custom query language.
39
+
Redis is an in-memory data store designed to serve data with the fastest possible response times. For this reason, Redis is frequently used for caching OLTP-style application queries and as a serving layer in data pipeline architectures (e.g., lambda architectures, online feature stores, etc.). Redis Stack is an extension to Redis that, among other things, lets you index your data on secondary attributes and then efficiently query it using a custom query language.
30
40
31
-
We built the Redis SQL Trino connector so that you can query Redis using any number of BI tools. For example, you can use this connector with Trino to query and visualize your Redis data in Tableau.
41
+
We built the Redis SQL Trino connector so that you can query Redis using SQL. This is useful for any application compatible with JDBC. For example, Redis SQL Trino lets you query and visualize your Redis data from Tableau.
32
42
33
43
== Quick start
34
44
35
-
To understand how Redis SQL works, it's best to try it for yourself. View the screen recording or follow the steps below:
45
+
To understand how Redis SQL Trino works, it's best to try it for yourself. View the screen recording or follow the steps below:
Next, create an index on the beer data. While still in the Redis CLI, you can create the required index by running the following `FT.CREATE` command:
68
79
[source,console]
69
80
----
70
-
127.0.0.1:6379> FT.CREATE beers ON HASH PREFIX 1 beer: SCHEMA id TAG SORTABLE brewery_id TAG SORTABLE name TEXT SORTABLE abv NUMERIC SORTABLE descript TEXT style_name TAG SORTABLE cat_name TAG SORTABLE
81
+
127.0.0.1:6379> FT.CREATE beers ON HASH PREFIX 1 beer: SCHEMA id TAG SORTABLE \
82
+
brewery_id TAG SORTABLE name TEXT SORTABLE abv NUMERIC SORTABLE descript TEXT \
83
+
style_name TAG SORTABLE cat_name TAG SORTABLE
71
84
----
72
85
73
86
Now that you've indexed the data set, you can query it using SQL statements through Trino. Start the Trino CLI:
@@ -90,11 +103,25 @@ trino:default> select * from beers where abv > 3.2 order by abv desc;
90
103
91
104
== Installation
92
105
93
-
To use Redis SQL Trino, you'll need a working Trino installation. See the https://trino.io/docs/current/installation.html[Trino installation and deplyoment guide] for details.
106
+
To run Redis SQL Trino in production, you'll need:
107
+
108
+
* Trino
109
+
* A copy of the Redis SQL Trino connector
110
+
* A https://redis.io/docs/stack/[Redis Stack], https://redis.com/redis-enterprise-cloud/overview/[Redis Cloud], and https://redis.com/redis-enterprise-software/overview/[Redis Enterprise] deployment
111
+
112
+
=== Trino
113
+
114
+
First, you'll need a working Trino installation.
115
+
116
+
See the https://trino.io/docs/current/installation.html[Trino installation and deplyoment guide] for details. Trino recommends a https://trino.io/docs/current/installation/containers.html[container-based deployment] using your orchestration platform of choice. If you run Kubernetes, see the https://trino.io/docs/current/installation/kubernetes.html[Trino Helm chart].
117
+
118
+
=== Redis SQL Trino Connector
119
+
120
+
Next, you'll need to install the Redis SQL Trino plugin and configure it. See our documentation for https://redis-field-engineering.github.io/redis-sql/#redisearch-connector[plugin installation] and https://redis-field-engineering.github.io/redis-sql/#configuration[plugin configuration].
94
121
95
-
Next, you'll need to install the Redis SQL Trino plugin and configure it. See https://redis-field-engineering.github.io/redis-sql/#redisearch-connector[plugin installation] and https://redis-field-engineering.github.io/redis-sql/#configuration[plugin configuration].
122
+
=== Redis installation
96
123
97
-
You will also need either https://redis.io/docs/stack/[Redis Stack], https://redis.com/redis-enterprise-cloud/overview/[Redis Cloud], or https://redis.com/redis-enterprise-software/overview/[Redis Enterprise].
124
+
For a self-managed deployment, or for testing locally, install https://redis.io/docs/stack/[Redis Stack] or spin up a free https://redis.com/try-free/[Redis Cloud] instance. If you need a fully-managed, cloud-based deployment of Redis on AWS, GCP, or Azure, see all of the https://redis.com/redis-enterprise-cloud/overview/[Redis Cloud] offerings. For deployment in your own private cloud or data center, consider https://redis.com/redis-enterprise-software/overview/[Redis Enterprise].
98
125
99
126
== Usage
100
127
@@ -104,7 +131,7 @@ Most real world applications will use the https://trino.io/docs/current/client/j
104
131
105
132
== Support
106
133
107
-
Redis SQL Trino is supported by the Redis Field Engineering team on a good faith effort basis. To report bugs, request features, or receive assistance, please {project-url}/issues[file an issue].
134
+
Redis SQL Trino is supported by Redis, Inc. on a good faith effort basis. To report bugs, request features, or receive assistance, please {project-url}/issues[file an issue].
0 commit comments