ducklake 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +25 -1
- data/lib/ducklake/client.rb +12 -1
- data/lib/ducklake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 535980c5eabd395203e0abc095d01b8ed502e12e4880347d06840a04f92cc98b
|
|
4
|
+
data.tar.gz: c9c8aac81ae63bd8d870a330cbdd1f3188dde5ee815909aa114ca200530ff62a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09115886b370740f415fe59c321ca6df78c1a21c8c5e5a8be608444ba54394eb706f9e07381a10b4cfe81a7114383074e157708ed1ef79c7f08e3e042858669e'
|
|
7
|
+
data.tar.gz: 2047f9acd798b0c8ce52215bef6420fde44602e6e360ccf54e5b020ac3b83ec8d3df72671b3894023ad07c523a5613f85717d16b55ee2e72a5ba0fdf73d19ed0
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -163,6 +163,8 @@ Delete data
|
|
|
163
163
|
ducklake.sql("DELETE * FROM events WHERE id = ?", [1])
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
+
## Transactions
|
|
167
|
+
|
|
166
168
|
Run multiple statements in a transaction
|
|
167
169
|
|
|
168
170
|
```ruby
|
|
@@ -173,6 +175,16 @@ end
|
|
|
173
175
|
|
|
174
176
|
Raise `DuckLake::Rollback` to rollback
|
|
175
177
|
|
|
178
|
+
Add commit info to a transaction
|
|
179
|
+
|
|
180
|
+
```ruby
|
|
181
|
+
ducklake.transaction(commit_message: "...", commit_author: "...") do
|
|
182
|
+
# ...
|
|
183
|
+
end
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
This will appear in [snapshots](#snapshots)
|
|
187
|
+
|
|
176
188
|
## Schema Changes
|
|
177
189
|
|
|
178
190
|
Update the schema
|
|
@@ -211,6 +223,12 @@ Get snapshots
|
|
|
211
223
|
ducklake.snapshots
|
|
212
224
|
```
|
|
213
225
|
|
|
226
|
+
Get the current snapshot
|
|
227
|
+
|
|
228
|
+
```ruby
|
|
229
|
+
ducklake.current_snapshot
|
|
230
|
+
```
|
|
231
|
+
|
|
214
232
|
Query the data at a specific snapshot version or time
|
|
215
233
|
|
|
216
234
|
```ruby
|
|
@@ -247,6 +265,12 @@ Clean up old files
|
|
|
247
265
|
ducklake.cleanup_old_files(older_than: Date.today - 7)
|
|
248
266
|
```
|
|
249
267
|
|
|
268
|
+
Rewrite files with a certain percentage of deleted rows
|
|
269
|
+
|
|
270
|
+
```ruby
|
|
271
|
+
ducklake.rewrite_data_files(delete_threshold: 0.5)
|
|
272
|
+
```
|
|
273
|
+
|
|
250
274
|
## Configuration
|
|
251
275
|
|
|
252
276
|
Get [options](https://ducklake.select/docs/stable/duckdb/usage/configuration)
|
|
@@ -328,7 +352,7 @@ ducklake.sql("COPY #{quoted_table} FROM #{quoted_file}")
|
|
|
328
352
|
|
|
329
353
|
## Encryption
|
|
330
354
|
|
|
331
|
-
Note: This feature is
|
|
355
|
+
Note: This feature is experimental and must be set when creating the catalog
|
|
332
356
|
|
|
333
357
|
Encrypt Parquet files
|
|
334
358
|
|
data/lib/ducklake/client.rb
CHANGED
|
@@ -64,7 +64,7 @@ module DuckLake
|
|
|
64
64
|
attach_options[:encrypted] = 1 if encrypted
|
|
65
65
|
attach_options[:snapshot_version] = snapshot_version if !snapshot_version.nil?
|
|
66
66
|
attach_options[:snapshot_time] = snapshot_time if !snapshot_time.nil?
|
|
67
|
-
attach_options[:data_inlining_row_limit] = data_inlining_row_limit
|
|
67
|
+
attach_options[:data_inlining_row_limit] = data_inlining_row_limit
|
|
68
68
|
attach_options[:create_if_not_exists] = false unless create_if_not_exists
|
|
69
69
|
attach_options[:migrate_if_required] = false unless migrate_if_required
|
|
70
70
|
attach_options[:override_data_path] = true if override_storage_url
|
|
@@ -220,6 +220,16 @@ module DuckLake
|
|
|
220
220
|
execute("SELECT value FROM ducklake_options(?) WHERE option_name = ?", [@catalog, "version"]).first["value"]
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
+
# experimental
|
|
224
|
+
def extension_version
|
|
225
|
+
execute("SELECT extension_version FROM duckdb_extensions() WHERE extension_name = ?", ["ducklake"]).first["extension_version"]
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# experimental
|
|
229
|
+
def duckdb_version
|
|
230
|
+
execute("SELECT VERSION() AS version").first["version"]
|
|
231
|
+
end
|
|
232
|
+
|
|
223
233
|
# https://ducklake.select/docs/stable/duckdb/maintenance/merge_adjacent_files
|
|
224
234
|
def merge_adjacent_files
|
|
225
235
|
execute("CALL merge_adjacent_files()")
|
|
@@ -331,6 +341,7 @@ module DuckLake
|
|
|
331
341
|
params << table_name
|
|
332
342
|
end
|
|
333
343
|
|
|
344
|
+
# TODO return nil in 0.2.0
|
|
334
345
|
symbolize_keys execute("CALL ducklake_flush_inlined_data(#{args.join(", ")})", params)
|
|
335
346
|
end
|
|
336
347
|
|
data/lib/ducklake/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ducklake
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Kane
|
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
requirements: []
|
|
56
|
-
rubygems_version:
|
|
56
|
+
rubygems_version: 4.0.3
|
|
57
57
|
specification_version: 4
|
|
58
58
|
summary: DuckLake for Ruby
|
|
59
59
|
test_files: []
|