{"id":19693884,"url":"https://github.com/aiven-open/sql-cli-for-apache-flink-docker","last_synced_at":"2025-07-20T22:07:26.335Z","repository":{"id":37729650,"uuid":"355934655","full_name":"Aiven-Open/sql-cli-for-apache-flink-docker","owner":"Aiven-Open","description":"SQL CLI for Apache Flink® via docker-compose","archived":false,"fork":false,"pushed_at":"2023-08-10T13:43:12.000Z","size":112,"stargazers_count":47,"open_issues_count":2,"forks_count":25,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-02-27T12:10:02.574Z","etag":null,"topics":["apacheflink","flink","sql-client"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aiven-Open.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-08T14:14:14.000Z","updated_at":"2024-10-26T00:12:19.000Z","dependencies_parsed_at":"2023-08-10T12:43:14.686Z","dependency_job_id":"ace645c1-cd1f-4523-b980-5ce7396dcda8","html_url":"https://github.com/Aiven-Open/sql-cli-for-apache-flink-docker","commit_stats":null,"previous_names":["aiven-open/sql-cli-for-apache-flink-docker"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Aiven-Open/sql-cli-for-apache-flink-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aiven-Open%2Fsql-cli-for-apache-flink-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aiven-Open%2Fsql-cli-for-apache-flink-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aiven-Open%2Fsql-cli-for-apache-flink-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aiven-Open%2Fsql-cli-for-apache-flink-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aiven-Open","download_url":"https://codeload.github.com/Aiven-Open/sql-cli-for-apache-flink-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aiven-Open%2Fsql-cli-for-apache-flink-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266205628,"owners_count":23892489,"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":["apacheflink","flink","sql-client"],"created_at":"2024-11-11T19:18:34.511Z","updated_at":"2025-07-20T22:07:26.319Z","avatar_url":"https://github.com/Aiven-Open.png","language":"Dockerfile","readme":"# SQL CLI for Apache Flink® on Docker®\n\n\nThis docker-compose provides an Apache Flink® SQL CLI image updated to the 1.17.1 version. It's inspired by [this](https://github.com/wuchong/flink-sql-demo/tree/v1.11-EN/sql-client).\n\n\nIt makes use of the `flink:1.17.1-scala_2.12-java11` images.\n\nThe `sql-client` service maps a `~/kafkacerts/` folder to `/certs` which can be used to create and pass files like Keystores when SSL authentication is needed (e.g. with Apache Kafka®).\n\nIncludes the SQL connectors to:\n* [Elasticsearch® 7](https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-elasticsearch7/3.0.1-1.17/flink-sql-connector-elasticsearch7-3.0.1-1.17.jar)\n* [Apache Kafka®](/opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/1.17.1/flink-sql-connector-kafka-1.17.1.jar)\n* [AVRO](https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-avro-confluent-registry/1.17.1/flink-sql-avro-confluent-registry-1.17.1.jar)\n* [JDBC](https://repo.maven.apache.org/maven2/org/apache/flink/flink-connector-jdbc/3.1.1-1.17/flink-connector-jdbc-3.1.1-1.17.jar)\n* [PostgreSQL 42.5.0](https://jdbc.postgresql.org/download/postgresql-42.5.0.jar)\n* [Flink Faker](https://github.com/knaufk/flink-faker/releases/download/v0.5.0/flink-faker-0.5.1.jar) allowing to [generate fake data](https://github.com/knaufk/flink-faker)\n\n## Usage\n\nYou need both [docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) installed.\n\nClone the current repository, navigate to the `sql-cli-for-apache-flink-docker` folder, then execute\n\n```\ndocker-compose up -d\n```\n\nThis will start the 3 nodes Flink cluster, to check which nodes are available use\n\n```\ndocker-compose ps\n```\n\nThe result should be similar to the below\n\n```\nName                      Command               State                Ports              \n-----------------------------------------------------------------------------------------------\nflink_jobmanager_1    /docker-entrypoint.sh jobm ...   Up      6123/tcp, 0.0.0.0:8081-\u003e8081/tcp\nsql-client            /docker-entrypoint.sh            Up      6123/tcp, 8081/tcp              \nflink_taskmanager_1   /docker-entrypoint.sh task ...   Up      6123/tcp, 8081/tcp              \n```\n\nApache Flink Web UI is now available at `localhost:8081`\n\n![Flink Web UI](img/flink-web-ui.png)\n\n\nTo Access the SQL CLI, execute\n\nIt could be done via one-line command\n```\ndocker exec -it sql-client /opt/sql-client/sql-client.sh\n```\n\nOr step by step instructions\n```\ndocker ps\n```\n\nAnd take note of the `CONTAINER_ID` related to the `ftisiot/flink_sql_cli:1.14.3` image (`af00e6ef943f` in the below example)\n\n```\nCONTAINER ID   IMAGE                          COMMAND                  CREATED         STATUS         PORTS                              NAMES\naf00e6ef943f   ftisiot/flink_sql_cli:1.16.0   \"/docker-entrypoint.…\"   2 minutes ago   Up 2 minutes   6123/tcp, 8081/tcp                 flink_sql-client_1\n22a459232385   flink:1.16.0-scala_2.12        \"/docker-entrypoint.…\"   2 minutes ago   Up 2 minutes   6123/tcp, 8081/tcp                 flink_taskmanager_1\n8b4d5c087800   flink:1.16.0-scala_2.12        \"/docker-entrypoint.…\"   2 minutes ago   Up 2 minutes   6123/tcp, 0.0.0.0:8081-\u003e8081/tcp   flink_jobmanager_1\n```\n\nNow execute the following code to enter the docker container in interactive mode\n\n```\ndocker exec -it \u003cCONTAINER_ID\u003e /bin/bash\n```\n\nFinally execute\n\n```\n./sql-client.sh\n```\n\nThis will popup Flink sql cli\n\n```\nReading default environment from: file:/opt/flink/conf/sql-client-conf.yaml\nNo session environment specified.\n\nCommand history file path: /root/.flink-sql-history\n                                   ▒▓██▓██▒\n                               ▓████▒▒█▓▒▓███▓▒\n                            ▓███▓░░        ▒▒▒▓██▒  ▒\n                          ░██▒   ▒▒▓▓█▓▓▒░      ▒████\n                          ██▒         ░▒▓███▒    ▒█▒█▒\n                            ░▓█            ███   ▓░▒██\n                              ▓█       ▒▒▒▒▒▓██▓░▒░▓▓█\n                            █░ █   ▒▒░       ███▓▓█ ▒█▒▒▒\n                            ████░   ▒▓█▓      ██▒▒▒ ▓███▒\n                         ░▒█▓▓██       ▓█▒    ▓█▒▓██▓ ░█░\n                   ▓░▒▓████▒ ██         ▒█    █▓░▒█▒░▒█▒\n                  ███▓░██▓  ▓█           █   █▓ ▒▓█▓▓█▒\n                ░██▓  ░█░            █  █▒ ▒█████▓▒ ██▓░▒\n               ███░ ░ █░          ▓ ░█ █████▒░░    ░█░▓  ▓░\n              ██▓█ ▒▒▓▒          ▓███████▓░       ▒█▒ ▒▓ ▓██▓\n           ▒██▓ ▓█ █▓█       ░▒█████▓▓▒░         ██▒▒  █ ▒  ▓█▒\n           ▓█▓  ▓█ ██▓ ░▓▓▓▓▓▓▓▒              ▒██▓           ░█▒\n           ▓█    █ ▓███▓▒░              ░▓▓▓███▓          ░▒░ ▓█\n           ██▓    ██▒    ░▒▓▓███▓▓▓▓▓██████▓▒            ▓███  █\n          ▓███▒ ███   ░▓▓▒░░   ░▓████▓░                  ░▒▓▒  █▓\n          █▓▒▒▓▓██  ░▒▒░░░▒▒▒▒▓██▓░                            █▓\n          ██ ▓░▒█   ▓▓▓▓▒░░  ▒█▓       ▒▓▓██▓    ▓▒          ▒▒▓\n          ▓█▓ ▓▒█  █▓░  ░▒▓▓██▒            ░▓█▒   ▒▒▒░▒▒▓█████▒\n           ██░ ▓█▒█▒  ▒▓▓▒  ▓█                █░      ░░░░   ░█▒\n           ▓█   ▒█▓   ░     █░                ▒█              █▓\n            █▓   ██         █░                 ▓▓        ▒█▓▓▓▒█░\n             █▓ ░▓██░       ▓▒                  ▓█▓▒░░░▒▓█░    ▒█\n              ██   ▓█▓░      ▒                    ░▒█▒██▒      ▓▓\n               ▓█▒   ▒█▓▒░                         ▒▒ █▒█▓▒▒░░▒██\n                ░██▒    ▒▓▓▒                     ▓██▓▒█▒ ░▓▓▓▓▒█▓\n                  ░▓██▒                          ▓░  ▒█▓█  ░░▒▒▒\n                      ▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▓▓  ▓░▒█░\n\n    ______ _ _       _       _____  ____  _         _____ _ _            _  BETA   \n   |  ____| (_)     | |     / ____|/ __ \\| |       / ____| (_)          | |  \n   | |__  | |_ _ __ | | __ | (___ | |  | | |      | |    | |_  ___ _ __ | |_\n   |  __| | | | '_ \\| |/ /  \\___ \\| |  | | |      | |    | | |/ _ \\ '_ \\| __|\n   | |    | | | | | |   \u003c   ____) | |__| | |____  | |____| | |  __/ | | | |_\n   |_|    |_|_|_| |_|_|\\_\\ |_____/ \\___\\_\\______|  \\_____|_|_|\\___|_| |_|\\__|\n\n        Welcome! Enter 'HELP;' to list all available commands. 'QUIT;' to exit.\n\n\nFlink SQL\u003e\n```\n\n## Trademarks\n\nApache Kafka, Apache Flink are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.. Aiven has no affiliation with and is not endorsed by The Apache Software Foundation. Docker is a trademark and property of their respective owners. All product and service names used in this website are for identification purposes only and do not imply endorsement.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiven-open%2Fsql-cli-for-apache-flink-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiven-open%2Fsql-cli-for-apache-flink-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiven-open%2Fsql-cli-for-apache-flink-docker/lists"}