{"id":21685679,"url":"https://github.com/redis-field-engineering/redis-sql-trino","last_synced_at":"2025-04-12T08:09:30.880Z","repository":{"id":37813780,"uuid":"335474583","full_name":"redis-field-engineering/redis-sql-trino","owner":"redis-field-engineering","description":"Real-time Indexed SQL Queries for Redis","archived":false,"fork":false,"pushed_at":"2023-12-19T17:06:12.000Z","size":9088,"stargazers_count":38,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T08:09:06.076Z","etag":null,"topics":["jdbc","redis","redisearch","sql","tableau"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redis-field-engineering.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-03T01:39:07.000Z","updated_at":"2025-02-25T09:43:38.000Z","dependencies_parsed_at":"2023-12-19T21:45:25.884Z","dependency_job_id":"473b0fc3-859b-4464-a403-598903bb5bf2","html_url":"https://github.com/redis-field-engineering/redis-sql-trino","commit_stats":null,"previous_names":["redis-field-engineering/calcite-redisearch","redis-field-engineering/redis-sql"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-field-engineering%2Fredis-sql-trino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-field-engineering%2Fredis-sql-trino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-field-engineering%2Fredis-sql-trino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-field-engineering%2Fredis-sql-trino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redis-field-engineering","download_url":"https://codeload.github.com/redis-field-engineering/redis-sql-trino/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537135,"owners_count":21120709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jdbc","redis","redisearch","sql","tableau"],"created_at":"2024-11-25T16:22:28.862Z","updated_at":"2025-04-12T08:09:30.843Z","avatar_url":"https://github.com/redis-field-engineering.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":":linkattrs:\n:project-owner:   redis-field-engineering\n:project-name:    redis-sql-trino\n:project-group:   com.redis\n:project-version: 0.3.4\n:name:            Redis SQL Trino\n:toc:\n:toc-title:\n:toc-placement!:\n\n++++\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Redis SQL Trino\" src=\".github/images/Redis SQL Github Banner Light.jpg\"\u003e\n\n  \u003cp align=\"center\"\u003e\n    Redis SQL Trino is a SQL interface for \u003ca href='https://redis.io/docs/stack/'\u003eRedis Stack\u003c/a\u003e, \u003ca href='https://redis.com/redis-enterprise-cloud/overview/'\u003eRedis Cloud\u003c/a\u003e, and \u003ca href='https://redis.com/redis-enterprise-software/overview/'\u003eRedis Enterprise\u003c/a\u003e.\n  \u003c/p\u003e\n\u003c/p\u003e\n++++\n\n'''\n\nimage:https://github.com/{project-owner}/{project-name}/actions/workflows/early-access.yml/badge.svg[\"Build Status\", link=\"https://github.com/{project-owner}/{project-name}/actions/workflows/early-access.yml\"]\nimage:https://codecov.io/gh/{project-owner}/{project-name}/branch/master/graph/badge.svg?token={codecov-token}[\"Coverage\", link=\"https://codecov.io/gh/{project-owner}/{project-name}\"]\n\n{name} lets you easily integrate with visualization frameworks — like Tableau and SuperSet — and platforms that support JDBC-compatible databases (e.g., Mulesoft).\nQuery support includes SELECT statements across secondary indexes on both Redis hashes \u0026 JSON, aggregations (e.g., count, min, max, avg), ordering, and more.\n\nTrino is a distributed SQL engine designed to query large data sets across one or more heterogeneous data sources.\nThough 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.\nHowever, that is where {name} shines since it can push the entire query to the data atomically. This eliminates the waste of many network hops and subsequent operations.\n\n[discrete]\n== Table of Contents\ntoc::[]\n\n== Background\n\nRedis is an in-memory data store designed to serve data with the fastest possible response times.\nFor 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.).\nRedis 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.\n\nWe built the {name} connector so that you can query Redis using SQL.\nThis is useful for any application compatible with JDBC.\nFor example, {name} lets you query and visualize your Redis data from Tableau.\n\n== Requirements\n\n{name} requires a Redis deployment that includes https://redis.io/docs/stack/search/https://redis.io/docs/stack/search/[RediSearch].\nRediSearch is a https://redis.io/docs/reference/modules/[Redis module] that adds querying and secondary indexing to Redis.\n\nRedis deployments that bundle RediSearch include:\n\n* https://redis.com/try-free/[Redis Cloud]: Fully-managed, enterprise-grade Redis deployed on AWS, Azure, or GCP.\n* https://redis.com/redis-enterprise-software/overview/[Redis Enterprise]: Enterprise-grade Redis for on-premises and private cloud deployment.\n* https://redis.io/docs/stack/[Redis Stack]: Redis distribution that includes RediSearch, RedisJSON, RedisGraph, RedisTimeSeries, and RedisBloom.\n\n== Quick start\n\nTo understand how {name} works, it's best to try it for yourself.\nView the screen recording or follow the steps below:\n\nimage::https://asciinema.org/a/526185.svg[asciicast,link=https://asciinema.org/a/526185]\n\nFirst, clone this git repository:\n[source,console,subs=\"verbatim,attributes\"]\n----\ngit clone https://github.com/{project-owner}/{project-name}.git\ncd {project-name}\n----\n\nNext, use Docker Compose to launch containers for Trino and Redis Stack:\n[source,console]\n----\ndocker compose up\n----\n\nThis example includes a preloaded data set describing a collection of beers.\n\nEach beer is represented as a Redis hash.\nStart the Redis CLI to examine this data.\nFor example, here's how you can view the \"Beer Town Brown\" record:\n[source,console]\n----\ndocker exec -it redis /opt/redis-stack/bin/redis-cli\n127.0.0.1:6379\u003e hgetall beer:190\n----\n\nNow let's query the same data using SQL statements through Trino.\nStart the Trino CLI:\n[source,console]\n----\ndocker exec -it trino trino --catalog redisearch --schema default\n----\n\nView \"Beer Town Brown\" using SQL:\n[source,console]\n----\ntrino:default\u003e select * from beers where id = '190';\n----\n\nShow all beers with an ABV greater than 3.2%:\n[source,console]\n----\ntrino:default\u003e select * from beers where abv \u003e 3.2 order by abv desc;\n----\n\n== Installation\n\nTo run {name} in production, you'll need:\n\n* Trino\n* A copy of the {name} connector\n* 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\n\n=== Trino\n\nFirst, you'll need a working Trino installation.\n\nSee the https://trino.io/docs/current/installation.html[Trino installation and deployment guide] for details.\nTrino recommends a https://trino.io/docs/current/installation/containers.html[container-based deployment] using your orchestration platform of choice.\nIf you run Kubernetes, see the https://trino.io/docs/current/installation/kubernetes.html[Trino Helm chart].\n\n=== {name} Connector\n\nNext, you'll need to install the {name} plugin and configure it.\nSee our documentation for https://{project-owner}.github.io/{project-name}/#redisearch-connector[plugin installation] and https://{project-owner}.github.io/{project-name}/#configuration[plugin configuration].\n\n=== Redis installation\n\nFor 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.\nIf 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.\nFor deployment in your own private cloud or data center, consider https://redis.com/redis-enterprise-software/overview/[Redis Enterprise].\n\n== Documentation\n\n{name} documentation is available at https://{project-owner}.github.io/{project-name}\n\n== Usage\n\nThe example above uses the https://trino.io/docs/current/client/cli.html[Trino CLI] to access your data.\n\nMost real world applications will use the https://trino.io/docs/current/client/jdbc.html[Trino JDBC driver] to issue queries.\nSee the https://{project-owner}.github.io/{project-name}/#clients[{name}] documentation for details.\n\n== Support\n\n{name} is supported by Redis, Inc. on a good faith effort basis.\nTo report bugs, request features, or receive assistance, please https://github.com/{project-owner}/{project-name}/issues[file an issue].\n\n== License\n\n{name} is licensed under the MIT License.\nCopyright (C) 2023 Redis, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis-field-engineering%2Fredis-sql-trino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredis-field-engineering%2Fredis-sql-trino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis-field-engineering%2Fredis-sql-trino/lists"}