chamikaramj commented on code in PR #36305: URL: https://github.com/apache/beam/pull/36305#discussion_r2399659035
########## website/www/site/content/en/documentation/dsls/sql/shell.md: ########## @@ -26,23 +26,77 @@ This page describes how to work with the shell, but does not focus on specific f ## Quickstart -To use Beam SQL shell, you must first clone the [Beam SDK repository](https://github.com/apache/beam). Then, from the root of the repository clone, execute the following commands to run the shell: +The easiest way to get started with the Beam SQL shell is using the `beam-sql.sh` script: +### Using beam-sql.sh Script + +The `beam-sql.sh` script automatically downloads and sets up the Beam SQL shell with all dependencies. + +#### Installation + +1. **Download the script:** + ```bash + curl -O https://raw.githubusercontent.com/apache/beam/master/scripts/beam-sql.sh + chmod +x beam-sql.sh + ``` + +2. **Run the shell:** + ```bash + ./beam-sql.sh + ``` + +The script will automatically: +- Download a recent stable Beam version by default +- Build a self-contained JAR with all dependencies +- Cache the JAR for future use (stored in `~/.beam/cache/`) +- Launch the Beam SQL shell + +#### Prerequisites + +- **Java**: Java 8 or higher must be installed and available in your PATH +- **curl**: Required for downloading the Maven wrapper and dependencies + +#### Command-line Options + +The `beam-sql.sh` script supports several options: + +```bash +./beam-sql.sh [--version <beam_version>] [--runner <runner_name>] [--io <io_connector>] [--list-versions] [-h|--help] ``` -./gradlew -p sdks/java/extensions/sql/jdbc -Pbeam.sql.shell.bundled=':runners:flink:1.17,:sdks:java:io:kafka' installDist -./sdks/java/extensions/sql/jdbc/build/install/jdbc/bin/jdbc +**Options:** +- `--version <beam_version>`: Specify the Apache Beam version (a recent stable version is used by default). +- `--runner <runner_name>`: Specify the Beam runner to use (default: direct). Supported: direct, dataflow +- `--io <io_connector>`: Specify an IO connector to include (e.g., iceberg, kafka). Can be used multiple times +- `--list-versions`: List all available Beam versions from Maven Central and exit +- `-h, --help`: Show help message + +**Examples:** + +```bash +# Use a specific Beam version +./beam-sql.sh --version 2.66.0 Review Comment: From Python you can try this: https://github.com/apache/beam/blob/a3fd151f8f9c9a1297225742b32845e65353ea3e/sdks/python/apache_beam/yaml/yaml_provider.py#L66 For documentation we use this: https://github.com/apache/beam/blob/a3fd151f8f9c9a1297225742b32845e65353ea3e/website/www/site/config.toml#L107 Both updated during Beam releases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
