rb_snowflake_client 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41fc128164ffef226da74985180b136ecfbce6314cb3041e131653765c9e486f
4
- data.tar.gz: b86fe4295d3ad395682214e116a0a4bf1e25213d7815ee52dffbe302d5c87e4a
3
+ metadata.gz: af3e56d97ebae43ae931c9c50784d7a3af0fe0e4a70f7e2a28c932d30371eff5
4
+ data.tar.gz: cdd2e9f55805e8d27e344925b8917b6d292aa1b07ed87ac8443060d31e224ccc
5
5
  SHA512:
6
- metadata.gz: 89ad4c5b56f58acbd1440b8f0a3fb55c2a4aaa259bbea1ee8823078f95c00acfd4edf6a19e3ad03ebe539516de1988dda49b59560ccdbe43209ecdc579c0b147
7
- data.tar.gz: 2fb149655ba64aa0b45a38b65fa21f8a14889c522de6bb0bc5cd43d3905306f03f46f28ac3c51a6b8cabbf0564221958bf9f06a670c40e83fcd6229b44dbe8cf
6
+ metadata.gz: 3c3aae7bf833cab432ea952419e951f51584100766eccd07d3a978c449fd1a2fd532a5756a0789242ff1baa7319dc360a162ba608d502d12436837f456033b97
7
+ data.tar.gz: cf1828f9a00b3be7c6030c5bc3e6f1be834206e364be477aa944faffaaf3638dc65a61bbc215c6f7428fd103ee62a1077e9658fa08055479e632b29d15f008f7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rb_snowflake_client (1.0.5)
4
+ rb_snowflake_client (1.0.6)
5
5
  concurrent-ruby (>= 1.2)
6
6
  connection_pool (>= 2.4)
7
7
  dotenv (>= 2.8)
data/README.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  The available options for connecting from Ruby to Snowflake include:
6
6
  * ODBC - which works, but can be very slow, especially for a lot of data, which is probably why you're using Snowflake
7
- * The [ruby snowflake client][https://github.com/rinsed-org/ruby-snowflake-client] that wraps the go client. This is probably the fastest single threaded option, which we also created. However, that library takes the ruby GVL and so stops all other processing in your ruby process (threads).
7
+ * The [ruby snowflake client](https://github.com/rinsed-org/ruby-snowflake-client) that wraps the go client. This is probably the fastest single threaded option, which we also created. However, that library takes the ruby GVL and so stops all other processing in your ruby process (threads).
8
8
 
9
9
  This library is implemented in ruby and while it leverages some libraries that have native extensions, doesn't currently include anything itself. Depending on network latency and the shape of the data this library can be faster or slower than the go wrapper. The big advantages are:
10
10
  * It uses about half the memory when you pull a full result set into memory
11
- * It does not hold onto the [ruby GVL][https://www.speedshop.co/2020/05/11/the-ruby-gvl-and-scaling.html] and so does not block other threads while waiting on IO like the go wrapper client.
11
+ * It does not hold onto the [ruby GVL](https://www.speedshop.co/2020/05/11/the-ruby-gvl-and-scaling.html) and so does not block other threads while waiting on IO like the go wrapper client.
12
12
  * It will consume more resources for the same data, because it's using the HTTP v2 API and getting JSON back, there is just more work to as compared to the go or python clients that use Apache Arrow under the covers.
13
13
 
14
14
  # Usage
@@ -128,7 +128,7 @@ module RubySnowflake
128
128
  @_enable_polling_queries = false
129
129
  end
130
130
 
131
- def query(query, warehouse: nil, streaming: false, database: nil)
131
+ def query(query, warehouse: nil, streaming: false, database: nil, schema: nil)
132
132
  warehouse ||= @default_warehouse
133
133
  database ||= @default_database
134
134
 
@@ -136,8 +136,11 @@ module RubySnowflake
136
136
  response = nil
137
137
  connection_pool.with do |connection|
138
138
  request_body = {
139
- "statement" => query, "warehouse" => warehouse&.upcase,
140
- "database" => database&.upcase, "timeout" => @query_timeout
139
+ "database" => database&.upcase,
140
+ "schema" => schema&.upcase,
141
+ "statement" => query,
142
+ "timeout" => @query_timeout,
143
+ "warehouse" => warehouse&.upcase,
141
144
  }
142
145
 
143
146
  response = request_with_auth_and_headers(
@@ -1,3 +1,3 @@
1
1
  module RubySnowflake
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_snowflake_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rinsed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-20 00:00:00.000000000 Z
11
+ date: 2024-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby