jk-shah commented on code in PR #41436:
URL: https://github.com/apache/beam/pull/41436#discussion_r4758763406
##########
sdks/python/apache_beam/cli/main.py:
##########
@@ -88,17 +92,31 @@
Every other --flag is passed to the pipeline as a Beam pipeline option.
""" + _EXIT_CODES
+_SQL_EPILOG = """\
+examples:
+ beam sql
+ beam sql --io csv --io parquet
Review Comment:
When neither `-e` nor `-f` is passed, `beam sql` launches an interactive `0:
BeamSQL>` REPL (`BeamSqlLine` / `sqlline`) where you run `CREATE EXTERNAL
TABLE`, `SELECT`, and `INSERT INTO` statements interactively. Passing `--io
<name>` adds `org.apache.beam:beam-sdks-java-io-<name>` to the Maven POM when
building the cached shaded uber-JAR
(`~/.beam/cache/beam-<ver>_runner-<runner>_ios-<sorted-ios>.jar`, merging
`META-INF/services/` via `ServicesResourceTransformer`) before starting that
interactive shell.
As for what `beam sql --io csv --io parquet` specifically do? It shaded
both `beam-sdks-java-io-csv` and `beam-sdks-java-io-parquet` into the uber-JAR
and opened the interactive shell:
- **`--io parquet` is required** to use `TYPE parquet` tables
(`ParquetTableProvider` marks `beam-sdks-java-io-parquet` as `provided`, so
without `--io parquet` `ParquetIO` is missing from the classpath).
- **`--io csv` was actually a no-op for Beam SQL** (bad example on my
part!): It is already bundled in `beam-sdks-java-extensions-sql-jdbc`. Updated
main description to better reflect it.
--
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]