td 0.18.0 → 0.19.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1dbc916f042b6416a0e1938f7d1b352d2bad5f3cb44be4d3f9e9d576f51f96b
4
- data.tar.gz: faa0d9b3281e368d0999714aa7e58a9f517da3071dab4d5c357fb0e8f3a97ad5
3
+ metadata.gz: 1ebe67b2367225f0f76628747040e690fcaeb12e6ac87b1f23942fab375c1b4b
4
+ data.tar.gz: 9dcb16a1c380e358228f0d0ec4a46278e558936426f9f72df569f9482ddcb255
5
5
  SHA512:
6
- metadata.gz: 61584b44bf0e10309f3117af78b547158340735515745f06d4647cbf9c67aac513c2e26bcfc3f5f86dbb0c878257852f80bbc014e2fc2d1eeb4baca4f7c41c77
7
- data.tar.gz: 527a8c17ca6e253dc0d5e3ead71a7aab077af320aa6d940af4ec0b89ed29ecec7222c59c66abd4ba0629dbb4301658d274ca115b070641662c4db4167424f539
6
+ metadata.gz: b2616cbddece9bc85c97144be570779a3b12abf640eb06811e40704d931f23ee5d1fe4c7bba479e45e5d9cac2b781a2fc248db2efe4faa9fd22091281bf9745f
7
+ data.tar.gz: 1d3e79c3f50093eefb7a43d91d4350d7b96f924d1eb38a1df67d486d2144e16d666d4b440c957bf7ded2b73326f57e5e2b3c184b548e358f4ae85b46ae825005
data/.circleci/config.yml CHANGED
@@ -9,13 +9,26 @@ orbs:
9
9
  commands:
10
10
  install_windows_requirements:
11
11
  description: "Install windows requirements"
12
+ parameters:
13
+ ruby_version:
14
+ type: string
15
+ default: "latest"
12
16
  steps:
13
17
  - run:
14
18
  name: "Install MSYS2"
19
+ shell: powershell.exe
15
20
  command: choco install msys2 -y
16
21
  - run:
17
22
  name: "Install Ruby devkit"
23
+ shell: powershell.exe
18
24
  command: ridk install 2 3
25
+ - run:
26
+ name: "Install Ruby version"
27
+ shell: powershell.exe
28
+ command: choco install ruby --version=<<parameters.ruby_version>>
29
+ - run:
30
+ name: "Install bundler"
31
+ command: gem install bundler
19
32
  bundle-install:
20
33
  description: "Install dependencies"
21
34
  steps:
@@ -65,16 +78,25 @@ jobs:
65
78
  steps:
66
79
  - run-tests-flow
67
80
 
81
+ ruby_33:
82
+ docker:
83
+ - image: cimg/ruby:3.3-browsers
84
+ steps:
85
+ - run-tests-flow
86
+
87
+ ruby_34:
88
+ docker:
89
+ - image: cimg/ruby:3.4-browsers
90
+ steps:
91
+ - run-tests-flow
92
+
68
93
  win_ruby:
69
94
  executor:
70
95
  name: win/default
71
96
  shell: powershell.exe
72
97
  steps:
73
- - install_windows_requirements
74
- - run:
75
- name: "Install bundler"
76
- shell: powershell.exe
77
- command: gem install bundler
98
+ - install_windows_requirements:
99
+ ruby_version: "3.4.4.2"
78
100
  - run-tests-flow
79
101
 
80
102
 
@@ -85,4 +107,6 @@ workflows:
85
107
  - ruby_30
86
108
  - ruby_31
87
109
  - ruby_32
110
+ - ruby_33
111
+ - ruby_34
88
112
  - win_ruby
data/ChangeLog CHANGED
@@ -1,3 +1,11 @@
1
+ == 2025-08-05 version 0.19.0
2
+
3
+ * Remove partial_delete api.
4
+
5
+ == 2025-07-18 version 0.18.1
6
+
7
+ * Use https://toolbelt.treasuredata.com/ for TD Toolbelt's download URL #270
8
+
1
9
  == 2025-04-29 version 0.18.0
2
10
 
3
11
  * Update password symbol for user creation #262
data/bin/td CHANGED
@@ -9,7 +9,7 @@ require 'td/updater'
9
9
  TreasureData::Updater.disable(<<EOS
10
10
 
11
11
  `td update` is only available from the Treasure Data Toolbelt.
12
- You can download and install it from http://toolbelt.treasure-data.com.
12
+ You can download and install it from http://toolbelt.treasuredata.com.
13
13
 
14
14
  It appers you are running the `td` gem. To update the gem to the latest
15
15
  version, please run `gem update td`.
@@ -79,7 +79,6 @@ subcommands=(
79
79
  "table\:export":"Dump logs in a table to the specified storage"
80
80
  "table\:swap":"Swap names of two tables"
81
81
  "table\:tail":"Get recently imported logs"
82
- "table\:partial_delete":"Delete logs from the table within the specified time range"
83
82
 
84
83
  "wf":"Run a workflow command"
85
84
  "workflow":"Run a workflow command"
@@ -241,7 +241,6 @@ module List
241
241
  add_list 'table:swap', %w[db table1 table2], 'Swap names of two tables', ['table:swap example_db table1 table2']
242
242
  add_list 'table:rename', %w[db from_table dest_table], 'rename exist table', ['table:rename example_db table1 table2']
243
243
  add_list 'table:tail', %w[db table], 'Get recently imported logs', ['table:tail example_db table1', 'table:tail example_db table1 -n 30']
244
- add_list 'table:partial_delete', %w[db table], 'Delete logs from the table within the specified time range', ['table:partial_delete example_db table1 --from 1341000000 --to 1341003600']
245
244
  add_list 'table:expire', %w[db table expire_days], 'Expire data in table after specified number of days. Set to 0 to disable the expiration.', ['table:expire example_db table1 30']
246
245
  add_list 'table:update', %w[db table], 'Update table options', ['table:update example_db table1 --include-v false']
247
246
 
@@ -289,72 +289,6 @@ module Command
289
289
  end
290
290
  end
291
291
 
292
- def table_partial_delete(op)
293
- from = nil
294
- to = nil
295
- wait = false
296
- pool_name = nil
297
-
298
- op.on('-t', '--to TIME', 'end time of logs to delete in Unix time >0 and multiple of 3600 (1 hour)') {|s|
299
- if s.to_i.to_s == s
300
- # UNIX time
301
- to = s.to_i
302
- else
303
- require 'time'
304
- to = Time.parse(s).to_i
305
- end
306
- }
307
- op.on('-f', '--from TIME', 'start time of logs to delete in Unix time >0 and multiple of 3600 (1 hour)') {|s|
308
- if s.to_i.to_s == s
309
- from = s.to_i
310
- else
311
- require 'time'
312
- from = Time.parse(s).to_i
313
- end
314
- }
315
- op.on('-w', '--wait', 'wait for the job to finish', TrueClass) {|b|
316
- wait = b
317
- }
318
- op.on('-O', '--pool-name NAME', 'specify resource pool by name') {|s|
319
- pool_name = s
320
- }
321
-
322
- db_name, table_name = op.cmd_parse
323
-
324
- unless from
325
- $stderr.puts "-f, --from TIME option is required"
326
- exit 1
327
- end
328
-
329
- unless to
330
- $stderr.puts "-t, --to TIME option is required"
331
- exit 1
332
- end
333
-
334
- if from % 3600 != 0 || to % 3600 != 0
335
- $stderr.puts "Time for the -f / --from and -t / --to options must either be a multiple of 3600 (1 hour)\n" +
336
- " or be expressed in Ruby time string format where the minutes and seconds are 0"
337
- exit 1
338
- end
339
-
340
- client = get_client
341
-
342
- table = get_table(client, db_name, table_name)
343
-
344
- opts = {}
345
- opts['pool_name'] = pool_name if pool_name
346
- job = client.partial_delete(db_name, table_name, to, from, opts)
347
-
348
- $stderr.puts "Partial delete job #{job.job_id} is queued."
349
- $stderr.puts "Use '#{$prog} " + Config.cl_options_string + "job:show #{job.job_id}' to show the status."
350
-
351
- if wait
352
- $stderr.puts "queued..."
353
- wait_job(job)
354
- $stdout.puts "Status : #{job.status}"
355
- end
356
- end
357
-
358
292
  def table_update(op)
359
293
  params = {}
360
294
  op.on('--expire-days DAYS', Integer, 'set table expire days') do |v|
@@ -140,7 +140,7 @@ module TreasureData
140
140
  end
141
141
 
142
142
  def digdag_base_url(version=nil)
143
- base = 'https://toolbelt.treasure-data.com/digdag'
143
+ base = 'https://toolbelt.treasuredata.com/digdag'
144
144
  if version.to_s == ''
145
145
  base
146
146
  else
data/lib/td/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TreasureData
2
- TOOLBELT_VERSION = '0.18.0'
2
+ TOOLBELT_VERSION = '0.19.0'
3
3
  end
@@ -161,7 +161,7 @@ EOF
161
161
  expect(TreasureData::Updater).to_not have_received(:stream_fetch).with(
162
162
  %r{/java/}, instance_of(File))
163
163
  expect(TreasureData::Updater).to have_received(:stream_fetch).with(
164
- 'https://toolbelt.treasure-data.com/digdag?user=test%40example.com', instance_of(File))
164
+ 'https://toolbelt.treasuredata.com/digdag?user=test%40example.com', instance_of(File))
165
165
  end
166
166
 
167
167
  it 'installs java + digdag and can run a workflow' do
@@ -180,7 +180,7 @@ EOF
180
180
  expect(stdout_io.string).to include 'Downloading workflow module'
181
181
  expect(File).to exist(File.join(ENV[home_env], '.td', 'digdag', 'digdag'))
182
182
  expect(TreasureData::Updater).to have_received(:stream_fetch).with(
183
- 'https://toolbelt.treasure-data.com/digdag?user=test%40example.com', instance_of(File))
183
+ 'https://toolbelt.treasuredata.com/digdag?user=test%40example.com', instance_of(File))
184
184
 
185
185
  # Check that java and digdag is not re-installed
186
186
  stdout_io.truncate(0)
@@ -228,7 +228,7 @@ EOF
228
228
  expect(TreasureData::Updater).to_not have_received(:stream_fetch).with(
229
229
  %r{/java/}, instance_of(File))
230
230
  expect(TreasureData::Updater).to have_received(:stream_fetch).with(
231
- 'https://toolbelt.treasure-data.com/digdag?user=test%40example.com', instance_of(File))
231
+ 'https://toolbelt.treasuredata.com/digdag?user=test%40example.com', instance_of(File))
232
232
 
233
233
  # Check that digdag is not re-installed
234
234
  stdout_io.truncate(0)
@@ -250,7 +250,7 @@ EOF
250
250
  expect(stdout_io.string).to include 'Downloading workflow module'
251
251
  expect(File).to exist(File.join(ENV[home_env], '.td', 'digdag', 'digdag'))
252
252
  expect(TreasureData::Updater).to have_received(:stream_fetch).with(
253
- 'https://toolbelt.treasure-data.com/digdag', instance_of(File))
253
+ 'https://toolbelt.treasuredata.com/digdag', instance_of(File))
254
254
  }
255
255
  end
256
256
 
data/td.gemspec CHANGED
@@ -22,11 +22,12 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency "yajl-ruby", ">= 1.3.1", "< 2.0"
23
23
  gem.add_dependency "hirb", ">= 0.4.5"
24
24
  gem.add_dependency "parallel", "~> 1.20.0"
25
- gem.add_dependency "td-client", ">= 1.0.8", "< 3"
25
+ gem.add_dependency "td-client", ">= 1.0.8", "< 4"
26
26
  gem.add_dependency "td-logger", ">= 0.3.21", "< 2"
27
27
  gem.add_dependency "rubyzip", "~> 1.3.0"
28
28
  gem.add_dependency "zip-zip", "~> 0.3"
29
29
  gem.add_dependency "ruby-progressbar", "~> 1.7"
30
+ gem.add_dependency "csv"
30
31
  gem.add_development_dependency "rake"
31
32
  gem.add_development_dependency "rspec"
32
33
  gem.add_development_dependency 'webrick'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Treasure Data, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-29 00:00:00.000000000 Z
11
+ date: 2025-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -95,7 +95,7 @@ dependencies:
95
95
  version: 1.0.8
96
96
  - - "<"
97
97
  - !ruby/object:Gem::Version
98
- version: '3'
98
+ version: '4'
99
99
  type: :runtime
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
@@ -105,7 +105,7 @@ dependencies:
105
105
  version: 1.0.8
106
106
  - - "<"
107
107
  - !ruby/object:Gem::Version
108
- version: '3'
108
+ version: '4'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: td-logger
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +168,20 @@ dependencies:
168
168
  - - "~>"
169
169
  - !ruby/object:Gem::Version
170
170
  version: '1.7'
171
+ - !ruby/object:Gem::Dependency
172
+ name: csv
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ type: :runtime
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
171
185
  - !ruby/object:Gem::Dependency
172
186
  name: rake
173
187
  requirement: !ruby/object:Gem::Requirement
@@ -350,7 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
364
  - !ruby/object:Gem::Version
351
365
  version: '0'
352
366
  requirements: []
353
- rubygems_version: 3.3.26
367
+ rubygems_version: 3.3.27
354
368
  signing_key:
355
369
  specification_version: 4
356
370
  summary: CLI to manage data on Treasure Data, the Hadoop-based cloud data warehousing