Skip to content

Business intelligence made simple

Default to public schema

Andrew Kane35d7be3fe6cb
diff --git a/README.md b/README.md
index 9910ff9d..8f543efb 100644
--- a/README.md
+++ b/README.md
@@ -417,7 +417,7 @@ Add [presto-client](https://github.com/treasure-data/presto-client-ruby) to your
```yml
data_sources:
my_source:
- url: presto://user@hostname:8080/catalog?schema=schema
+ url: presto://user@hostname:8080/catalog
```
## Learn SQL
diff --git a/lib/blazer/adapters/presto_adapter.rb b/lib/blazer/adapters/presto_adapter.rb
index f5256c93..1ee0eddb 100644
--- a/lib/blazer/adapters/presto_adapter.rb
+++ b/lib/blazer/adapters/presto_adapter.rb
@@ -34,7 +34,7 @@ module Blazer
Presto::Client.new(
server: "#{uri.host}:#{uri.port}",
catalog: uri.path.to_s.sub(/\A\//, ""),
- schema: query["schema"],
+ schema: query["schema"] || "public",
user: uri.user,
http_debug: false
)