Skip to content

Commit dc0b9db

Browse files
prabhacloudprabhakarreddy1claudeianmcook
authored
Fix Python Trino quickstart catalog typo and macOS install step (#112)
* Fix Python Trino quickstart catalog typo and macOS install step - Correct the URI catalog parameter from `tcph` to `tpch`. The example query still ran because the table was fully qualified, but the default catalog in the connection string was wrong. - Update the install command to `dbc install trino --level user` so the driver is placed in a path the ADBC driver manager searches by default. Addresses the dlopen failure reported in #96. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Fix same typo in Java and Kotlin examples --------- Co-authored-by: prabhakarreddy1 <prabhakar.reddy@USP.org> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Ian Cook <ianmcook@gmail.com>
1 parent d612c54 commit dc0b9db

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎java/trino/src/main/java/tech/columnar/Example.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class Example {
3333
public static void main(String[] args) throws Exception {
3434
Map<String, Object> params = new HashMap<>();
3535
JniDriver.PARAM_DRIVER.set(params, "trino");
36-
params.put("uri", "http://user@localhost:8080?catalog=tcph&schema=tiny");
36+
params.put("uri", "http://user@localhost:8080?catalog=tpch&schema=tiny");
3737

3838
try (BufferAllocator allocator = new RootAllocator();
3939
AdbcDatabase db =

‎kotlin/trino/src/main/kotlin/Main.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private const val DRIVER_FACTORY = "org.apache.arrow.adbc.driver.jni.JniDriverFa
2323
fun main() {
2424
val params = mutableMapOf<String, Any>()
2525
JniDriver.PARAM_DRIVER.set(params, "trino")
26-
params["uri"] = "http://user@localhost:8080?catalog=tcph&schema=tiny"
26+
params["uri"] = "http://user@localhost:8080?catalog=tpch&schema=tiny"
2727

2828
RootAllocator().use { allocator ->
2929
AdbcDriverManager.getInstance().connect(DRIVER_FACTORY, allocator, params).use { db ->

‎python/trino/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ limitations under the License.
4242
1. Install the Trino ADBC driver:
4343

4444
```sh
45-
dbc install trino
45+
dbc install trino --level user
4646
```
4747

4848
1. Customize the Python script `main.py` as needed

‎python/trino/main.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
with (
2323
dbapi.connect(
2424
driver="trino",
25-
db_kwargs={"uri": "http://user@localhost:8080?catalog=tcph&schema=tiny"},
25+
db_kwargs={"uri": "http://user@localhost:8080?catalog=tpch&schema=tiny"},
2626
) as con,
2727
con.cursor() as cursor,
2828
):

0 commit comments

Comments
 (0)