gooddata 2.1.19 → 2.2.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 +5 -5
- data/.gdc-ii-config.yaml +1 -1
- data/.github/workflows/build.yml +66 -0
- data/.github/workflows/pre-merge.yml +72 -0
- data/CHANGELOG.md +38 -0
- data/Dockerfile +21 -14
- data/Dockerfile.jruby +1 -11
- data/LICENSE +4409 -16
- data/README.md +1 -2
- data/SDK_VERSION +1 -1
- data/VERSION +1 -1
- data/ci/mssql/pom.xml +62 -0
- data/ci/mysql/pom.xml +57 -0
- data/ci/redshift/pom.xml +1 -1
- data/docker-compose.lcm.yml +0 -3
- data/gooddata.gemspec +2 -1
- data/k8s/charts/lcm-bricks/Chart.yaml +1 -1
- data/lcm.rake +2 -8
- data/lib/gooddata/bricks/middleware/aws_middleware.rb +35 -9
- data/lib/gooddata/cloud_resources/blobstorage/blobstorage_client.rb +98 -0
- data/lib/gooddata/cloud_resources/mssql/drivers/.gitkeepme +0 -0
- data/lib/gooddata/cloud_resources/mssql/mssql_client.rb +122 -0
- data/lib/gooddata/cloud_resources/mysql/drivers/.gitkeepme +0 -0
- data/lib/gooddata/cloud_resources/mysql/mysql_client.rb +111 -0
- data/lib/gooddata/cloud_resources/postgresql/postgresql_client.rb +0 -1
- data/lib/gooddata/cloud_resources/snowflake/snowflake_client.rb +18 -1
- data/lib/gooddata/helpers/data_helper.rb +9 -4
- data/lib/gooddata/lcm/actions/collect_meta.rb +3 -1
- data/lib/gooddata/lcm/actions/migrate_gdc_date_dimension.rb +3 -2
- data/lib/gooddata/lcm/actions/synchronize_clients.rb +56 -7
- data/lib/gooddata/lcm/actions/synchronize_dataset_mappings.rb +64 -0
- data/lib/gooddata/lcm/actions/synchronize_ldm.rb +19 -8
- data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +12 -9
- data/lib/gooddata/lcm/actions/update_metric_formats.rb +185 -0
- data/lib/gooddata/lcm/data/delete_from_lcm_release.sql.erb +5 -0
- data/lib/gooddata/lcm/helpers/release_table_helper.rb +42 -8
- data/lib/gooddata/lcm/lcm2.rb +5 -0
- data/lib/gooddata/mixins/md_object_query.rb +1 -0
- data/lib/gooddata/models/data_source.rb +5 -1
- data/lib/gooddata/models/dataset_mapping.rb +36 -0
- data/lib/gooddata/models/metadata/label.rb +26 -27
- data/lib/gooddata/models/project.rb +34 -9
- data/lib/gooddata/models/schedule.rb +13 -1
- data/lib/gooddata/models/user_filters/user_filter_builder.rb +58 -53
- data/lib/gooddata/rest/phmap.rb +1 -0
- metadata +45 -18
- data/lib/gooddata/bricks/middleware/bulk_salesforce_middleware.rb +0 -37
@@ -0,0 +1,36 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
#
|
4
|
+
# Copyright (c) 2010-2021 GoodData Corporation. All rights reserved.
|
5
|
+
# This source code is licensed under the BSD-style license found in the
|
6
|
+
# LICENSE file in the root directory of this source tree.
|
7
|
+
|
8
|
+
module GoodData
|
9
|
+
class DatasetMapping
|
10
|
+
DATASET_MAPPING_GET_URI = '/gdc/dataload/projects/%<project_id>s/modelMapping/datasets'
|
11
|
+
DATASET_MAPPING_UPDATE_URI = '/gdc/dataload/projects/%<project_id>s/modelMapping/datasets/bulk/upsert'
|
12
|
+
|
13
|
+
class << self
|
14
|
+
def [](opts = { :client => GoodData.connection, :project => GoodData.project })
|
15
|
+
client, project = GoodData.get_client_and_project(opts)
|
16
|
+
get_uri = DATASET_MAPPING_GET_URI % { project_id: project.pid }
|
17
|
+
res = client.get(get_uri)
|
18
|
+
res
|
19
|
+
end
|
20
|
+
|
21
|
+
alias_method :get, :[]
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(data)
|
25
|
+
@data = data
|
26
|
+
end
|
27
|
+
|
28
|
+
def save(opts)
|
29
|
+
client, project = GoodData.get_client_and_project(opts)
|
30
|
+
|
31
|
+
post_uri = DATASET_MAPPING_UPDATE_URI % { project_id: project.pid }
|
32
|
+
res = client.post(post_uri, @data, opts)
|
33
|
+
res
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -40,22 +40,20 @@ module GoodData
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
# Gets valid elements
|
43
|
+
# Gets valid elements of a label for a specific paging (:offset and :limit) or get validElements of a specific value (:filter).
|
44
|
+
# In the case filter a specific value, because the API /validElements only filter by partial match, we need to filter again at client side for exact match.
|
44
45
|
# @return [Array] Results
|
45
46
|
def get_valid_elements(*args)
|
46
|
-
|
47
|
-
|
48
|
-
# so we do a preliminary first request to check and then increase the limit if needed
|
49
|
-
if results['validElements']['paging']['total'].to_i != params[:limit]
|
47
|
+
if args && !args.empty? && args.first[:filter]
|
48
|
+
params = args.first
|
50
49
|
params[:limit] = 100_000
|
51
50
|
results, = valid_elements params
|
52
|
-
|
53
|
-
|
54
|
-
i['element']['title'] != params[:filter]
|
55
|
-
end
|
51
|
+
results['validElements']['items'] = results['validElements']['items'].select do |i|
|
52
|
+
i['element']['title'] == params[:filter]
|
56
53
|
end
|
54
|
+
else
|
55
|
+
results, = valid_elements(*args)
|
57
56
|
end
|
58
|
-
|
59
57
|
results
|
60
58
|
end
|
61
59
|
|
@@ -74,24 +72,25 @@ module GoodData
|
|
74
72
|
# @option options [Number] :limit limits the number of values to certain number. Default is 100
|
75
73
|
# @return [Array]
|
76
74
|
def values(options = {})
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
91
|
-
break if elements['items'].count < page_limit
|
92
|
-
offset += page_limit
|
75
|
+
all_values = []
|
76
|
+
offset = options[:offset] || 0
|
77
|
+
page_limit = options[:limit] || 100
|
78
|
+
loop do
|
79
|
+
results = get_valid_elements(limit: page_limit, offset: offset)
|
80
|
+
|
81
|
+
elements = results['validElements']
|
82
|
+
elements['items'].map do |el|
|
83
|
+
v = el['element']
|
84
|
+
all_values << {
|
85
|
+
:value => v['title'],
|
86
|
+
:uri => v['uri']
|
87
|
+
}
|
93
88
|
end
|
89
|
+
break if elements['items'].count < page_limit
|
90
|
+
|
91
|
+
offset += page_limit
|
94
92
|
end
|
93
|
+
all_values
|
95
94
|
end
|
96
95
|
|
97
96
|
def values_count
|
@@ -136,7 +135,7 @@ module GoodData
|
|
136
135
|
if status_url
|
137
136
|
results = client.poll_on_response(status_url) do |body|
|
138
137
|
status = body['taskState'] && body['taskState']['status']
|
139
|
-
status == 'RUNNING' || status == 'PREPARED'
|
138
|
+
status == 'RUNNING' || status == 'PREPARED' || body['uri']
|
140
139
|
end
|
141
140
|
end
|
142
141
|
|
@@ -30,6 +30,7 @@ require_relative 'process'
|
|
30
30
|
require_relative 'project_log_formatter'
|
31
31
|
require_relative 'project_role'
|
32
32
|
require_relative 'blueprint/blueprint'
|
33
|
+
require_relative 'dataset_mapping'
|
33
34
|
|
34
35
|
require_relative 'metadata/scheduled_mail'
|
35
36
|
require_relative 'metadata/scheduled_mail/dashboard_attachment'
|
@@ -255,6 +256,22 @@ module GoodData
|
|
255
256
|
transfer_schedules(from_project, to_project)
|
256
257
|
end
|
257
258
|
|
259
|
+
def get_dataset_mapping(from_project)
|
260
|
+
GoodData::DatasetMapping.get(:client => from_project.client, :project => from_project)
|
261
|
+
end
|
262
|
+
|
263
|
+
def update_dataset_mapping(model_mapping_json, to_project)
|
264
|
+
dataset_mapping = GoodData::DatasetMapping.new(model_mapping_json)
|
265
|
+
res = dataset_mapping.save(:client => to_project.client, :project => to_project)
|
266
|
+
status = res&.dig('datasetMappings', 'items').nil? ? "Failed" : "OK"
|
267
|
+
count = "OK".eql?(status) ? res['datasetMappings']['items'].length : 0
|
268
|
+
{
|
269
|
+
to: to_project.pid,
|
270
|
+
count: count,
|
271
|
+
status: status
|
272
|
+
}
|
273
|
+
end
|
274
|
+
|
258
275
|
# @param from_project The source project
|
259
276
|
# @param to_project The target project
|
260
277
|
# @param options Optional parameters
|
@@ -337,20 +354,16 @@ module GoodData
|
|
337
354
|
def get_data_source_alias(data_source_id, client, aliases)
|
338
355
|
unless aliases[data_source_id]
|
339
356
|
data_source = GoodData::DataSource.from_id(data_source_id, client: client)
|
340
|
-
if data_source&.
|
357
|
+
if data_source&.alias
|
341
358
|
aliases[data_source_id] = {
|
342
|
-
:type =>
|
343
|
-
:alias => data_source
|
359
|
+
:type => data_source.type,
|
360
|
+
:alias => data_source.alias
|
344
361
|
}
|
345
362
|
end
|
346
363
|
end
|
347
364
|
aliases[data_source_id]
|
348
365
|
end
|
349
366
|
|
350
|
-
def get_data_source_type(data_source_data)
|
351
|
-
data_source_data&.dig('dataSource', 'connectionInfo') ? data_source_data['dataSource']['connectionInfo'].first[0].upcase : ""
|
352
|
-
end
|
353
|
-
|
354
367
|
def replace_process_data_source_ids(process_data, client, aliases)
|
355
368
|
component = process_data.dig(:process, :component)
|
356
369
|
if component&.dig(:configLocation, :dataSourceConfig)
|
@@ -460,7 +473,9 @@ module GoodData
|
|
460
473
|
local_stuff = local_schedules.map do |s|
|
461
474
|
v = s.to_hash
|
462
475
|
after_schedule = local_schedules.find { |s2| s.trigger_id == s2.obj_id }
|
463
|
-
|
476
|
+
after_process_schedule = from_project_processes.find { |p| after_schedule && p.obj_id == after_schedule.process_id }
|
477
|
+
v[:after] = s.trigger_id && after_process_schedule && after_schedule && after_schedule.name
|
478
|
+
v[:trigger_execution_status] = s.trigger_execution_status
|
464
479
|
v[:remote_schedule] = s
|
465
480
|
v[:params] = v[:params].except("EXECUTABLE", "PROCESS_ID")
|
466
481
|
v.compact
|
@@ -529,6 +544,7 @@ module GoodData
|
|
529
544
|
schedule.params = (schedule_spec[:params] || {})
|
530
545
|
schedule.cron = schedule_spec[:cron] if schedule_spec[:cron]
|
531
546
|
schedule.after = schedule_cache[schedule_spec[:after]] if schedule_spec[:after]
|
547
|
+
schedule.trigger_execution_status = schedule_cache[schedule_spec[:trigger_execution_status]] if schedule_spec[:after]
|
532
548
|
schedule.hidden_params = schedule_spec[:hidden_params] || {}
|
533
549
|
if process_spec.type != :dataload
|
534
550
|
schedule.executable = schedule_spec[:executable] || (process_spec.type == :ruby ? 'main.rb' : 'main.grf')
|
@@ -589,7 +605,8 @@ module GoodData
|
|
589
605
|
hidden_params: schedule_spec[:hidden_params],
|
590
606
|
name: schedule_spec[:name],
|
591
607
|
reschedule: schedule_spec[:reschedule],
|
592
|
-
state: schedule_spec[:state]
|
608
|
+
state: schedule_spec[:state],
|
609
|
+
trigger_execution_status: schedule_spec[:trigger_execution_status]
|
593
610
|
}
|
594
611
|
end
|
595
612
|
end
|
@@ -2022,6 +2039,14 @@ module GoodData
|
|
2022
2039
|
GoodData::Project.transfer_etl(client, self, target)
|
2023
2040
|
end
|
2024
2041
|
|
2042
|
+
def dataset_mapping
|
2043
|
+
GoodData::Project.get_dataset_mapping(self)
|
2044
|
+
end
|
2045
|
+
|
2046
|
+
def update_dataset_mapping(model_mapping_json)
|
2047
|
+
GoodData::Project.update_dataset_mapping(model_mapping_json, self)
|
2048
|
+
end
|
2049
|
+
|
2025
2050
|
def transfer_processes(target)
|
2026
2051
|
GoodData::Project.transfer_processes(self, target)
|
2027
2052
|
end
|
@@ -101,6 +101,7 @@ module GoodData
|
|
101
101
|
|
102
102
|
schedule.name = options[:name]
|
103
103
|
schedule.set_trigger(trigger)
|
104
|
+
schedule.trigger_execution_status = options[:trigger_execution_status]
|
104
105
|
schedule.params = default_opts[:params].merge(options[:params] || {})
|
105
106
|
schedule.hidden_params = options[:hidden_params] || {}
|
106
107
|
schedule.timezone = options[:timezone] || default_opts[:timezone]
|
@@ -468,6 +469,7 @@ module GoodData
|
|
468
469
|
hidden_params: hidden_params,
|
469
470
|
cron: cron,
|
470
471
|
trigger_id: trigger_id,
|
472
|
+
trigger_execution_status: trigger_execution_status,
|
471
473
|
timezone: timezone,
|
472
474
|
uri: uri,
|
473
475
|
reschedule: reschedule,
|
@@ -486,6 +488,16 @@ module GoodData
|
|
486
488
|
self
|
487
489
|
end
|
488
490
|
|
491
|
+
def trigger_execution_status
|
492
|
+
json['schedule']['triggerExecutionStatus']
|
493
|
+
end
|
494
|
+
|
495
|
+
def trigger_execution_status=(trigger_execution_status)
|
496
|
+
json['schedule']['triggerExecutionStatus'] = trigger_execution_status
|
497
|
+
@dirty = true
|
498
|
+
self # rubocop:disable Lint/Void
|
499
|
+
end
|
500
|
+
|
489
501
|
def name
|
490
502
|
json['schedule']['name']
|
491
503
|
end
|
@@ -530,7 +542,7 @@ module GoodData
|
|
530
542
|
'hiddenParams' => GoodData::Helpers.encode_hidden_params(hidden_params)
|
531
543
|
}
|
532
544
|
}
|
533
|
-
|
545
|
+
res['schedule']['triggerExecutionStatus'] = trigger_execution_status if trigger_execution_status
|
534
546
|
res['schedule']['reschedule'] = reschedule if reschedule
|
535
547
|
|
536
548
|
res
|
@@ -203,7 +203,7 @@ module GoodData
|
|
203
203
|
# so it precaches the values and still be able to function for larger ones even
|
204
204
|
# though that would mean tons of requests
|
205
205
|
def self.get_small_labels(labels_cache)
|
206
|
-
labels_cache.values.select { |label| label
|
206
|
+
labels_cache.values.select { |label| label &.values_count &. < 100_000 }
|
207
207
|
end
|
208
208
|
|
209
209
|
# Creates a MAQL expression(s) based on the filter defintion.
|
@@ -421,68 +421,73 @@ module GoodData
|
|
421
421
|
results: create_results + delete_results }
|
422
422
|
end
|
423
423
|
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
'userFilters'
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
424
|
+
if to_create.empty?
|
425
|
+
create_results = []
|
426
|
+
else
|
427
|
+
create_results = to_create.each_slice(100).flat_map do |batch|
|
428
|
+
batch.pmapcat do |related_uri, group|
|
429
|
+
group.each(&:save)
|
430
|
+
res = client.get("/gdc/md/#{project.pid}/userfilters?users=#{related_uri}")
|
431
|
+
items = res['userFilters']['items'].empty? ? [] : res['userFilters']['items'].first['userFilters']
|
432
|
+
|
433
|
+
payload = {
|
434
|
+
'userFilters' => {
|
435
|
+
'items' => [{
|
436
|
+
'user' => related_uri,
|
437
|
+
'userFilters' => items.concat(group.map(&:uri))
|
438
|
+
}]
|
439
|
+
}
|
436
440
|
}
|
437
|
-
|
438
|
-
res = client.post("/gdc/md/#{project.pid}/userfilters", payload)
|
441
|
+
res = client.post("/gdc/md/#{project.pid}/userfilters", payload)
|
439
442
|
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
443
|
+
# turn the errors from hashes into array of hashes
|
444
|
+
update_result = res['userFiltersUpdateResult'].flat_map do |k, v|
|
445
|
+
v.map { |r| { status: k.to_sym, user: r, type: :create } }
|
446
|
+
end
|
444
447
|
|
445
|
-
|
446
|
-
|
448
|
+
update_result.map do |result|
|
449
|
+
result[:status] == :failed ? result.merge(GoodData::Helpers.symbolize_keys(result[:user])) : result
|
450
|
+
end
|
447
451
|
end
|
448
452
|
end
|
453
|
+
project_log_formatter.log_user_filter_results(create_results, to_create)
|
454
|
+
create_errors = create_results.select { |r| r[:status] == :failed }
|
455
|
+
fail "Creating MUFs resulted in errors: #{create_errors}" if create_errors.any?
|
449
456
|
end
|
450
457
|
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
res = client.post("/gdc/md/#{project.pid}/userfilters", payload)
|
473
|
-
results.concat(res['userFiltersUpdateResult']
|
458
|
+
if to_delete.empty?
|
459
|
+
delete_results = []
|
460
|
+
elsif !options[:do_not_touch_filters_that_are_not_mentioned]
|
461
|
+
delete_results = to_delete.each_slice(100).flat_map do |batch|
|
462
|
+
batch.flat_map do |related_uri, group|
|
463
|
+
results = []
|
464
|
+
if related_uri
|
465
|
+
res = client.get("/gdc/md/#{project.pid}/userfilters?users=#{related_uri}")
|
466
|
+
items = res['userFilters']['items'].empty? ? [] : res['userFilters']['items'].first['userFilters']
|
467
|
+
payload = {
|
468
|
+
'userFilters' => {
|
469
|
+
'items' => [
|
470
|
+
{
|
471
|
+
'user' => related_uri,
|
472
|
+
'userFilters' => items - group.map(&:uri)
|
473
|
+
}
|
474
|
+
]
|
475
|
+
}
|
476
|
+
}
|
477
|
+
res = client.post("/gdc/md/#{project.pid}/userfilters", payload)
|
478
|
+
results.concat(res['userFiltersUpdateResult']
|
474
479
|
.flat_map { |k, v| v.map { |r| { status: k.to_sym, user: r, type: :delete } } }
|
475
480
|
.map { |result| result[:status] == :failed ? result.merge(GoodData::Helpers.symbolize_keys(result[:user])) : result })
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
end
|
481
|
-
end
|
481
|
+
end
|
482
|
+
group.peach(&:delete)
|
483
|
+
results
|
484
|
+
end
|
482
485
|
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
+
project_log_formatter.log_user_filter_results(delete_results, to_delete)
|
487
|
+
delete_errors = delete_results.select { |r| r[:status] == :failed } if delete_results
|
488
|
+
fail "Deleting MUFs resulted in errors: #{delete_errors}" if delete_errors&.any?
|
489
|
+
end
|
490
|
+
end
|
486
491
|
|
487
492
|
{ created: to_create, deleted: to_delete, results: create_results + (delete_results || []) }
|
488
493
|
end
|
data/lib/gooddata/rest/phmap.rb
CHANGED
@@ -82,6 +82,7 @@ module GoodData
|
|
82
82
|
|
83
83
|
['/gdc/internal/projects/{id}/objects/setPermissions', %r{/gdc/internal/projects/[^\/]+/objects/setPermissions}],
|
84
84
|
['/gdc/internal/projects/{id}/roles', %r{/gdc/internal/projects/[^\/]+/roles}],
|
85
|
+
['/gdc/dataload/projects/{id}/modelMapping/datasets/bulk/upsert', %r{/gdc/dataload/projects/[^\/]+/modelMapping/datasets/bulk/upsert}],
|
85
86
|
['/gdc/md/{id}/variables/item/{id}', %r{/gdc/md/[^\/]+/variables/item/[\d]+}],
|
86
87
|
['/gdc/md/{id}/validate/task/{id}', %r{/gdc/md/[^\/]+/validate/task/[^\/]+}],
|
87
88
|
['/gdc/md/{id}/using2/{id}/{id}', %r{/gdc/md/[^\/]+/using2/[\d]+/[\d]+}],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gooddata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kolesnikov
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: license_finder
|
@@ -336,6 +336,34 @@ dependencies:
|
|
336
336
|
- - "<"
|
337
337
|
- !ruby/object:Gem::Version
|
338
338
|
version: 1.4.0
|
339
|
+
- !ruby/object:Gem::Dependency
|
340
|
+
name: azure-storage-blob
|
341
|
+
requirement: !ruby/object:Gem::Requirement
|
342
|
+
requirements:
|
343
|
+
- - "~>"
|
344
|
+
- !ruby/object:Gem::Version
|
345
|
+
version: 1.1.0
|
346
|
+
type: :runtime
|
347
|
+
prerelease: false
|
348
|
+
version_requirements: !ruby/object:Gem::Requirement
|
349
|
+
requirements:
|
350
|
+
- - "~>"
|
351
|
+
- !ruby/object:Gem::Version
|
352
|
+
version: 1.1.0
|
353
|
+
- !ruby/object:Gem::Dependency
|
354
|
+
name: nokogiri
|
355
|
+
requirement: !ruby/object:Gem::Requirement
|
356
|
+
requirements:
|
357
|
+
- - "~>"
|
358
|
+
- !ruby/object:Gem::Version
|
359
|
+
version: 1.10.0
|
360
|
+
type: :runtime
|
361
|
+
prerelease: false
|
362
|
+
version_requirements: !ruby/object:Gem::Requirement
|
363
|
+
requirements:
|
364
|
+
- - "~>"
|
365
|
+
- !ruby/object:Gem::Version
|
366
|
+
version: 1.10.0
|
339
367
|
- !ruby/object:Gem::Dependency
|
340
368
|
name: gli
|
341
369
|
requirement: !ruby/object:Gem::Requirement
|
@@ -488,20 +516,6 @@ dependencies:
|
|
488
516
|
- - ">="
|
489
517
|
- !ruby/object:Gem::Version
|
490
518
|
version: 1.2.1
|
491
|
-
- !ruby/object:Gem::Dependency
|
492
|
-
name: salesforce_bulk_query
|
493
|
-
requirement: !ruby/object:Gem::Requirement
|
494
|
-
requirements:
|
495
|
-
- - "~>"
|
496
|
-
- !ruby/object:Gem::Version
|
497
|
-
version: '0.2'
|
498
|
-
type: :runtime
|
499
|
-
prerelease: false
|
500
|
-
version_requirements: !ruby/object:Gem::Requirement
|
501
|
-
requirements:
|
502
|
-
- - "~>"
|
503
|
-
- !ruby/object:Gem::Version
|
504
|
-
version: '0.2'
|
505
519
|
- !ruby/object:Gem::Dependency
|
506
520
|
name: terminal-table
|
507
521
|
requirement: !ruby/object:Gem::Requirement
|
@@ -584,6 +598,8 @@ files:
|
|
584
598
|
- ".flayignore"
|
585
599
|
- ".gdc-ii-config-chart.yaml"
|
586
600
|
- ".gdc-ii-config.yaml"
|
601
|
+
- ".github/workflows/build.yml"
|
602
|
+
- ".github/workflows/pre-merge.yml"
|
587
603
|
- ".gitignore"
|
588
604
|
- ".pronto.yml"
|
589
605
|
- ".rspec"
|
@@ -623,6 +639,8 @@ files:
|
|
623
639
|
- bin/users.sh
|
624
640
|
- ci.rake
|
625
641
|
- ci/bigquery/pom.xml
|
642
|
+
- ci/mssql/pom.xml
|
643
|
+
- ci/mysql/pom.xml
|
626
644
|
- ci/postgresql/pom.xml
|
627
645
|
- ci/redshift/pom.xml
|
628
646
|
- ci/snowflake/pom.xml
|
@@ -651,7 +669,6 @@ files:
|
|
651
669
|
- lib/gooddata/bricks/middleware/aws_middleware.rb
|
652
670
|
- lib/gooddata/bricks/middleware/base_middleware.rb
|
653
671
|
- lib/gooddata/bricks/middleware/bench_middleware.rb
|
654
|
-
- lib/gooddata/bricks/middleware/bulk_salesforce_middleware.rb
|
655
672
|
- lib/gooddata/bricks/middleware/context_logger_decorator.rb
|
656
673
|
- lib/gooddata/bricks/middleware/context_manager.rb
|
657
674
|
- lib/gooddata/bricks/middleware/decode_params_middleware.rb
|
@@ -686,9 +703,14 @@ files:
|
|
686
703
|
- lib/gooddata/client.rb
|
687
704
|
- lib/gooddata/cloud_resources/bigquery/bigquery_client.rb
|
688
705
|
- lib/gooddata/cloud_resources/bigquery/drivers/.gitkeepme
|
706
|
+
- lib/gooddata/cloud_resources/blobstorage/blobstorage_client.rb
|
689
707
|
- lib/gooddata/cloud_resources/cloud_resource_client.rb
|
690
708
|
- lib/gooddata/cloud_resources/cloud_resource_factory.rb
|
691
709
|
- lib/gooddata/cloud_resources/cloud_resources.rb
|
710
|
+
- lib/gooddata/cloud_resources/mssql/drivers/.gitkeepme
|
711
|
+
- lib/gooddata/cloud_resources/mssql/mssql_client.rb
|
712
|
+
- lib/gooddata/cloud_resources/mysql/drivers/.gitkeepme
|
713
|
+
- lib/gooddata/cloud_resources/mysql/mysql_client.rb
|
692
714
|
- lib/gooddata/cloud_resources/postgresql/drivers/.gitkeepme
|
693
715
|
- lib/gooddata/cloud_resources/postgresql/postgresql_client.rb
|
694
716
|
- lib/gooddata/cloud_resources/redshift/drivers/log4j.properties
|
@@ -790,6 +812,7 @@ files:
|
|
790
812
|
- lib/gooddata/lcm/actions/synchronize_cas.rb
|
791
813
|
- lib/gooddata/lcm/actions/synchronize_clients.rb
|
792
814
|
- lib/gooddata/lcm/actions/synchronize_color_palette.rb
|
815
|
+
- lib/gooddata/lcm/actions/synchronize_dataset_mappings.rb
|
793
816
|
- lib/gooddata/lcm/actions/synchronize_etls_in_segment.rb
|
794
817
|
- lib/gooddata/lcm/actions/synchronize_label_types.rb
|
795
818
|
- lib/gooddata/lcm/actions/synchronize_ldm.rb
|
@@ -801,9 +824,11 @@ files:
|
|
801
824
|
- lib/gooddata/lcm/actions/synchronize_user_filters.rb
|
802
825
|
- lib/gooddata/lcm/actions/synchronize_user_groups.rb
|
803
826
|
- lib/gooddata/lcm/actions/synchronize_users.rb
|
827
|
+
- lib/gooddata/lcm/actions/update_metric_formats.rb
|
804
828
|
- lib/gooddata/lcm/actions/update_release_table.rb
|
805
829
|
- lib/gooddata/lcm/brick_logger.rb
|
806
830
|
- lib/gooddata/lcm/data/create_lcm_release.sql.erb
|
831
|
+
- lib/gooddata/lcm/data/delete_from_lcm_release.sql.erb
|
807
832
|
- lib/gooddata/lcm/data/insert_into_lcm_release.sql.erb
|
808
833
|
- lib/gooddata/lcm/data/select_from_lcm_release.sql.erb
|
809
834
|
- lib/gooddata/lcm/data/update_lcm_release.sql.erb
|
@@ -917,6 +942,7 @@ files:
|
|
917
942
|
- lib/gooddata/models/client_synchronization_result_details.rb
|
918
943
|
- lib/gooddata/models/data_product.rb
|
919
944
|
- lib/gooddata/models/data_source.rb
|
945
|
+
- lib/gooddata/models/dataset_mapping.rb
|
920
946
|
- lib/gooddata/models/datawarehouse.rb
|
921
947
|
- lib/gooddata/models/domain.rb
|
922
948
|
- lib/gooddata/models/execution.rb
|
@@ -1016,7 +1042,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1016
1042
|
- !ruby/object:Gem::Version
|
1017
1043
|
version: '0'
|
1018
1044
|
requirements: []
|
1019
|
-
|
1045
|
+
rubyforge_project:
|
1046
|
+
rubygems_version: 2.5.2.3
|
1020
1047
|
signing_key:
|
1021
1048
|
specification_version: 4
|
1022
1049
|
summary: A convenient Ruby wrapper around the GoodData RESTful API
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
#
|
3
|
-
# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
|
4
|
-
# This source code is licensed under the BSD-style license found in the
|
5
|
-
# LICENSE file in the root directory of this source tree.
|
6
|
-
|
7
|
-
require 'salesforce_bulk_query'
|
8
|
-
|
9
|
-
require_relative 'base_middleware'
|
10
|
-
|
11
|
-
module GoodData
|
12
|
-
module Bricks
|
13
|
-
class BulkSalesforceMiddleware < Bricks::Middleware
|
14
|
-
DEFAULT_VERSION = '29.0'.freeze
|
15
|
-
|
16
|
-
def self.create_client(params)
|
17
|
-
salesforce = nil
|
18
|
-
if params['salesforce_client']
|
19
|
-
|
20
|
-
client = params['salesforce_client']
|
21
|
-
client.authenticate!
|
22
|
-
|
23
|
-
salesforce = SalesforceBulkQuery::Api.new(client, logger: params['GDC_LOGGER'])
|
24
|
-
# SalesforceBulkQuery adds its own Restforce logging so turn it off
|
25
|
-
Restforce.log = false if params['GDC_LOGGER']
|
26
|
-
end
|
27
|
-
params.merge('salesforce_bulk_client' => salesforce)
|
28
|
-
end
|
29
|
-
|
30
|
-
def call(params)
|
31
|
-
params = params.to_hash
|
32
|
-
params = self.class.create_client(params)
|
33
|
-
@app.call(params)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|