{"id":50582273,"url":"https://github.com/tidbcloud/lakesql","last_synced_at":"2026-06-05T03:32:36.657Z","repository":{"id":360917834,"uuid":"1209052657","full_name":"tidbcloud/lakesql","owner":"tidbcloud","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-28T12:40:54.000Z","size":417,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T13:10:28.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/tidbcloud.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-13T03:39:15.000Z","updated_at":"2026-05-28T12:40:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tidbcloud/lakesql","commit_stats":null,"previous_names":["tidbcloud/lakesql"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tidbcloud/lakesql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Flakesql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Flakesql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Flakesql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Flakesql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidbcloud","download_url":"https://codeload.github.com/tidbcloud/lakesql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidbcloud%2Flakesql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33928631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-05T03:32:36.290Z","updated_at":"2026-06-05T03:32:36.636Z","avatar_url":"https://github.com/tidbcloud.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LakeSQL\n\nTiDB Cloud Lake Native Client in Rust\n\n## Components\n\n- [**core**](core): TiDB Cloud Lake RestAPI Rust Client\n\n- [**driver**](driver): TiDB Cloud Lake SQL Client for both RestAPI and FlightSQL in Rust\n\n- [**cli**](cli): TiDB Cloud Lake Native CLI\n\n### Bindings\n\n- [**python**](bindings/python): TiDB Cloud Lake Python Client\n\n- [**nodejs**](bindings/nodejs): TiDB Cloud Lake Node.js Client\n\n- [**java**](bindings/java): TiDB Cloud Lake Java Client (upcoming)\n\n## Installation for LakeSQL\n\n### Recommended: installation script\n\n```bash\ncurl -fsSL https://lakesql-bin.tidbcloud.com/install/lakesql.sh | bash\n```\n\nor\n\n```bash\ncurl -fsSL https://lakesql-bin.tidbcloud.com/install/lakesql.sh | bash -s -- -y --prefix /usr/local\n```\n\n### Alternative: install via cargo-binstall\n\nIf you already use Rust tooling and have `cargo-binstall` available, you can install the prebuilt `lakesql` binary from the published release artifacts:\n\n```bash\ncargo binstall lakesql\n```\n\nIf `cargo-binstall` is not installed yet, install it first:\n\n```bash\ncargo install cargo-binstall\n```\n\n### Linux package repositories\n\nUse the install script above if you want the least setup. Native package feeds are also published for `apt`, `dnf`/`yum`, and `apk`.\n\n#### Debian / Ubuntu\n\n```bash\ncurl -fsSL https://lakesql-bin.tidbcloud.com/keys/lakesql-archive-keyring.gpg \\\n  | sudo tee /usr/share/keyrings/lakesql-archive-keyring.gpg \u003e/dev/null\necho \"deb [signed-by=/usr/share/keyrings/lakesql-archive-keyring.gpg] https://lakesql-bin.tidbcloud.com/apt stable main\" \\\n  | sudo tee /etc/apt/sources.list.d/lakesql.list \u003e/dev/null\nsudo apt-get update\nsudo apt-get install -y lakesql\n```\n\n#### Fedora / RHEL\n\n```bash\nsudo tee /etc/yum.repos.d/lakesql.repo \u003e/dev/null \u003c\u003c'EOF'\n[lakesql]\nname=LakeSQL\nbaseurl=https://lakesql-bin.tidbcloud.com/rpm/stable/$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://lakesql-bin.tidbcloud.com/keys/RPM-GPG-KEY-lakesql\nEOF\nsudo dnf install -y lakesql\n```\n\n#### Alpine\n\n```bash\ncurl -fsSL https://lakesql-bin.tidbcloud.com/keys/lakesql-packages.rsa.pub \\\n  | sudo tee /etc/apk/keys/lakesql-packages.rsa.pub \u003e/dev/null\necho \"https://lakesql-bin.tidbcloud.com/apk/stable\" \\\n  | sudo tee -a /etc/apk/repositories \u003e/dev/null\nsudo apk update\nsudo apk add lakesql\n```\n\n### Manual binary download\n\n1. Resolve the latest version:\n\n```bash\ncurl -fsSL https://lakesql-bin.tidbcloud.com/lakesql/latest.json\n```\n\n2. Download the archive that matches your platform:\n\n```text\nhttps://lakesql-bin.tidbcloud.com/lakesql/vX.Y.Z/lakesql-\u003ctarget\u003e.tar.gz\n```\n\nSupported targets in the binary release flow:\n\n- `x86_64-apple-darwin`\n- `aarch64-apple-darwin`\n- `x86_64-unknown-linux-gnu`\n- `aarch64-unknown-linux-gnu`\n- `x86_64-unknown-linux-musl`\n- `aarch64-unknown-linux-musl`\n\n### Other install options\n\n- Rust CLI source install: `cargo install lakesql`\n- Python bindings: `pip install tidbcloudlake-driver`\n- Node.js bindings: `npm install tidbcloudlake-driver`\n\n## Usage\n\n```\n❯ lakesql --help\nTiDB Cloud Lake Native Command Line Tool\n\nUsage: lakesql [OPTIONS]\n\nOptions:\n      --help                       Print help information\n      --flight                     Using flight sql protocol, ignored when --dsn is set\n      --tls \u003cTLS\u003e                  Enable TLS, ignored when --dsn is set [possible values: true, false]\n  -h, --host \u003cHOST\u003e                TiDB Cloud Lake Server host, Default: 127.0.0.1, ignored when --dsn is set\n  -P, --port \u003cPORT\u003e                TiDB Cloud Lake Server port, Default: 8000, ignored when --dsn is set\n  -u, --user \u003cUSER\u003e                Default: root, overrides username in DSN\n  -p, --password \u003cPASSWORD\u003e        Password, overrides password in DSN [env: LAKESQL_PASSWORD]\n  -r, --role \u003cROLE\u003e                Downgrade role name, overrides role in DSN\n  -D, --database \u003cDATABASE\u003e        Database name, overrides database in DSN\n      --set \u003cSET\u003e                  Settings, overrides settings in DSN\n      --dsn \u003cDSN\u003e                  Data source name [env: LAKESQL_DSN]\n  -n, --non-interactive            Force non-interactive mode\n  -A, --no-auto-complete           Disable loading tables and fields for auto-completion, which offers a quicker start\n      --check                      Check for server status and exit\n      --query=\u003cQUERY\u003e              Query to execute\n  -d, --data \u003cDATA\u003e                Data to load, @file or @- for stdin. The `--query` should use the syntax: `INSERT FROM \u003ctable\u003e from @_tidbcloud_load file_format=(\u003cfile_format_options\u003e)`\n  -o, --output \u003cOUTPUT\u003e            Output format [possible values: table, csv, tsv, null]\n      --quote-style \u003cQUOTE_STYLE\u003e  Output quote style, applies to `csv` and `tsv` output formats [possible values: always, necessary, non-numeric, never]\n      --progress                   Show progress for query execution in stderr, only works with output format `table` and `null`.\n      --stats                      Show stats after query execution in stderr, only works with non-interactive mode.\n      --time[=\u003cTIME\u003e]              Only show execution time without results, will implicitly set output format to `null`. [possible values: local, server]\n  -l, --log-level \u003cLOG_LEVEL\u003e      [default: info]\n  -V, --version                    Print version\n```\n\n## Custom configuration\n\nBy default lakesql will read configuration from `~/.lakesql/config.toml` and `~/.config/lakesql/config.toml`\nsequentially if exists.\n\n- Example file\n\n```\n❯ cat ~/.lakesql/config.toml\n[connection]\nhost = \"127.0.0.1\"\ntls = false\n\n[connection.args]\nconnect_timeout = \"30\"\n\n[settings]\ndisplay_pretty_sql = true\nprogress_color = \"green\"\nno_auto_complete = true\nprompt = \":) \"\n```\n\n- Connection section\n\n| Parameter  | Description                 |\n| ---------- | --------------------------- |\n| `host`     | Server host to connect.     |\n| `port`     | Server port to connect.     |\n| `user`     | User name.                  |\n| `database` | Which database to connect.  |\n| `args`     | Additional connection args. |\n\n- Settings section\n\n| Parameter            | Description                                                                                                         |\n| -------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| `display_pretty_sql` | Whether to display SQL queries in a formatted way.                                                                  |\n| `prompt`             | The prompt to display before asking for input.                                                                      |\n| `progress_color`     | The color to use for the progress bar.                                                                              |\n| `show_progress`      | Whether to show a progress bar when executing queries.                                                              |\n| `show_stats`         | Whether to show statistics after executing queries.                                                                 |\n| `no_auto_complete`   | Whether to disable loading tables and fields for auto-completion on startup.                                        |\n| `max_display_rows`   | The maximum number of rows to display in table output format.                                                       |\n| `max_width`          | Limit display render box max width, 0 means default to the size of the terminal. 65535 means no limit for max_width |\n| `max_col_width`      | Limit display render each column max width, smaller than 3 means disable the limit.                                 |\n| `output_format`      | The output format to use.                                                                                           |\n| `expand`             | Expand table format display, default auto, could be on/off/auto.                                                    |\n| `time`               | Whether to show the time elapsed when executing queries.                                                            |\n| `multi_line`         | Whether to allow multi-line input.                                                                                  |\n| `quote_string`       | Whether to quote string values in table output format, default false.                                               |\n| `sql_delimiter`      | SQL delimiter, default `;`.                                                                                         |\n\n## Commands in REPL\n\n| Commands       | Description             |\n| -------------- | ----------------------- |\n| `!exit`        | Exit lakesql            |\n| `!quit`        | Exit lakesql            |\n| `!configs`     | Show current settings   |\n| `!set`         | Set settings            |\n| `!source file` | Source file and execute |\n\n## Setting commands in REPL\n\nWe can use `!set CMD_NAME VAL` to update the `Settings` above in runtime, example:\n\n```\n❯ lakesql\n\n:) !set display_pretty_sql false\n:) !set max_display_rows 10\n:) !set expand auto\n```\n\n## DSN\n\nFormat:\n\n```\nlake[+flight]://user:[password]@host[:port]/[database][?sslmode=disable][\u0026arg1=value1]\n```\n\nExamples:\n\n- `lake://root:@localhost:8000/?sslmode=disable\u0026presign=detect`\n\n- `lake://user1:password1@tnxxxx.gw.aws-us-east-2.default.tidbcloud.com:443/benchmark?warehouse=default\u0026enable_dphyp=1`\n\n- `lake+flight://root:@localhost:8900/database1?connect_timeout=10`\n\n### Available Args\n\n#### Common\n\n| Arg               | Description                          |\n| ----------------- | ------------------------------------ |\n| `tenant`          | Tenant ID, TiDB Cloud only.      |\n| `warehouse`       | Warehouse name, TiDB Cloud only. |\n| `sslmode`         | Set to `disable` if not using tls.   |\n| `tls_ca_file`     | Custom root CA certificate path.     |\n| `connect_timeout` | Connect timeout in seconds           |\n\n#### RestAPI Client\n\n| Arg                         | Description                                                                                                                                                      | Default   |\n|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|\n| `query_result_format`       | (Since v0.33.1) Format to fetch result set, available arguments are `json`/`arrow`.                                                                              | `JSON`    |\n| `sslmode`                   | SSL mode, available values are `enable`/`disable`.                                                                                                               | `disable` |\n| `wait_time_secs`            | Request wait time for page.                                                                                                                                      | `1`       |\n| `max_rows_per_page`         | Max result rows for a single page.                                                                                                                               | `10000`   |\n| `page_request_timeout_secs` | Timeout for a single page request.                                                                                                                               | `30`      |\n| `presign`                   | Whether to enable presign for data loading, available arguments are `auto`/`detect`/`on`/`off`. Default to `auto` which only enable presign for `TiDB Cloud` | `auto`    |\n\n#### FlightSQL Client\n\n| Arg                         | Description                                                               |\n|-----------------------------| ------------------------------------------------------------------------- |\n| `query_timeout`             | Query timeout seconds                                                     |\n| `tcp_nodelay`               | Default to `true`                                                         |\n| `tcp_keepalive`             | Tcp keepalive seconds, default to `3600`, set to `0` to disable keepalive |\n| `http2_keep_alive_interval` | Keep alive interval in seconds, default to `300`                          |\n| `keep_alive_timeout`        | Keep alive timeout in seconds, default to `20`                            |\n| `keep_alive_while_idle`     | Default to `true`                                                         |\n\n#### Query Settings\n\nsee: [TiDB Cloud Lake Settings](https://docs.tidbcloud.com/sql/sql-commands/administration-cmds/show-settings)\n\n## Development\n\n### Cargo fmt, clippy, deny\n\n```bash\nmake check\n```\n\n### Development mode\n\n- Run the CLI directly with `make run`\n- Build release binaries with `make build`\n\n### Unit tests\n\n```bash\nmake test\n```\n\n### integration tests\n\n_Note: Docker and Docker Compose needed_\n\n```bash\nmake integration\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidbcloud%2Flakesql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidbcloud%2Flakesql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidbcloud%2Flakesql/lists"}