gd_bam 0.0.15 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +313 -5
- data/bin/bam +126 -48
- data/lib/bam/version.rb +1 -1
- data/lib/bam.rb +51 -0
- data/lib/base/errors.rb +15 -0
- data/lib/base/flow.rb +37 -0
- data/lib/base/graph.rb +23 -0
- data/lib/base/metadata.rb +107 -0
- data/lib/base/project.rb +95 -0
- data/lib/base/repo.rb +35 -0
- data/lib/base/sink.rb +44 -0
- data/lib/base/step.rb +47 -0
- data/lib/base/tap.rb +167 -0
- data/lib/base/taps.rb +19 -0
- data/lib/cloud_connect/dsl/cc.rb +42 -0
- data/lib/cloud_connect/dsl/es_helpers.rb +49 -0
- data/lib/cloud_connect/dsl/helpers.rb +199 -0
- data/lib/{nodes → cloud_connect/dsl}/nodes.rb +106 -16
- data/lib/cloud_connect/dsl/sf_helpers.rb +39 -0
- data/lib/cloud_connect/dsl/structure_helpers.rb +94 -0
- data/lib/commands/commands.rb +110 -0
- data/lib/commands/deployment.rb +217 -0
- data/lib/commands/docs_commands.rb +41 -0
- data/lib/commands/gd_commands.rb +95 -0
- data/lib/commands/scaffold_commands.rb +103 -0
- data/lib/commands/sf_commands.rb +37 -0
- data/lib/commands/validators.rb +19 -0
- data/lib/compatibility.rb +19 -0
- data/lib/compiler/compiler.rb +76 -0
- data/lib/compiler/etl_visitor.rb +165 -0
- data/lib/dsl/dsl.rb +125 -0
- data/lib/generators/downloaders.rb +449 -0
- data/lib/generators/etl.rb +261 -0
- data/lib/generators/validators.rb +445 -0
- data/lib/graphs/docentize.grf +1 -1
- data/lib/graphs/dummy.grf +1 -1
- data/lib/graphs/goodsales_v2/docentize.grf +47 -0
- data/lib/graphs/goodsales_v2/dummy.grf +46 -0
- data/lib/graphs/goodsales_v2/load_history.grf +579 -0
- data/lib/graphs/goodsales_v2/process_account.grf +47 -0
- data/lib/graphs/goodsales_v2/process_activity.grf +222 -0
- data/lib/graphs/goodsales_v2/process_activity_dim.grf +88 -0
- data/lib/graphs/goodsales_v2/process_activity_owner.grf +48 -0
- data/lib/graphs/goodsales_v2/process_forecast.grf +20 -0
- data/lib/graphs/goodsales_v2/process_opp_records.grf +84 -0
- data/lib/graphs/goodsales_v2/process_opportunity.grf +46 -0
- data/lib/graphs/goodsales_v2/process_opportunity_line_item.grf +171 -0
- data/lib/graphs/goodsales_v2/process_opportunity_snapshot.grf +94 -0
- data/lib/graphs/goodsales_v2/process_owner.grf +48 -0
- data/lib/graphs/goodsales_v2/process_stage.grf +51 -0
- data/lib/graphs/goodsales_v2/process_stage_history.grf +184 -0
- data/lib/graphs/goodsales_v2/process_velocity_duration.grf +140 -0
- data/lib/graphs/process_account.grf +1 -1
- data/lib/graphs/process_activity.grf +1 -1
- data/lib/graphs/process_activity_dim.grf +1 -1
- data/lib/graphs/process_activity_owner.grf +1 -1
- data/lib/graphs/process_forecast.grf +1 -1
- data/lib/graphs/process_opp_records.grf +1 -1
- data/lib/graphs/process_opportunity.grf +1 -1
- data/lib/graphs/process_opportunity_line_item.grf +1 -1
- data/lib/graphs/process_opportunity_snapshot.grf +1 -1
- data/lib/graphs/process_owner.grf +1 -1
- data/lib/graphs/process_stage.grf +1 -1
- data/lib/graphs/process_stage_history.grf +1 -1
- data/lib/graphs/process_velocity_duration.grf +1 -1
- data/lib/nodes/clover_gen.rb +59 -946
- data/lib/nodes/dependency.rb +95 -96
- data/lib/runtime.rb +7 -648
- data/lib/utils/utils.rb +66 -0
- data/templates/flow.rb.erb +7 -6
- data/templates/join_template.grf.erb +1 -1
- data/templates/reformat_template.grf.erb +1 -1
- data/templates/sink.json.erb +28 -0
- data/templates/tap.json.erb +3 -5
- data/templates/workspace.prm.erb +4 -0
- metadata +50 -8
- data/lib/contract_checkers/contract_checkers.rb +0 -53
- data/lib/dsl/project_dsl.rb +0 -259
- data/lib/repo/1_config.json +0 -8
- data/templates/dataset.json.erb +0 -13
- data/templates/source.json.erb +0 -22
data/lib/nodes/dependency.rb
CHANGED
@@ -1,96 +1,95 @@
|
|
1
|
-
require 'rgl/adjacency'
|
2
|
-
require 'rgl/dot'
|
3
|
-
require 'rgl/topsort'
|
4
|
-
|
5
|
-
require 'repository/repo'
|
6
|
-
|
7
|
-
module GoodData
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
end
|
1
|
+
# require 'rgl/adjacency'
|
2
|
+
# require 'rgl/dot'
|
3
|
+
# require 'rgl/topsort'
|
4
|
+
#
|
5
|
+
# require 'repository/repo'
|
6
|
+
#
|
7
|
+
# module GoodData
|
8
|
+
# module CloverGenerator
|
9
|
+
# module Dependency
|
10
|
+
#
|
11
|
+
# class Visitor
|
12
|
+
#
|
13
|
+
# def accept(node)
|
14
|
+
# # puts node
|
15
|
+
# if node.type == "ldm"
|
16
|
+
# puts "LDM #{node.to_s}"
|
17
|
+
# else
|
18
|
+
# puts "doing something on #{node.to_s}"
|
19
|
+
# end
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# class N
|
25
|
+
# def initialize(x)
|
26
|
+
# @x = x
|
27
|
+
# end
|
28
|
+
#
|
29
|
+
# def to_s
|
30
|
+
# "#{@x[:type]}-#{@x[:name]}"
|
31
|
+
# end
|
32
|
+
#
|
33
|
+
# def type
|
34
|
+
# @x[:type]
|
35
|
+
# end
|
36
|
+
#
|
37
|
+
# def provides
|
38
|
+
# @x[:provides]
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# def requires
|
42
|
+
# @x[:requires]
|
43
|
+
# end
|
44
|
+
#
|
45
|
+
# def package
|
46
|
+
# @x[:package]
|
47
|
+
# end
|
48
|
+
#
|
49
|
+
# def visit(v)
|
50
|
+
# v.accept(self)
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
#
|
56
|
+
# def resolve(repo, you)
|
57
|
+
# repo << you
|
58
|
+
#
|
59
|
+
# providers = repo.reduce({}) do |memo, mod|
|
60
|
+
# package = mod.package
|
61
|
+
# mod.provides.each do |providee|
|
62
|
+
# memo[[package, providee].join('/')] = mod
|
63
|
+
# end
|
64
|
+
# memo
|
65
|
+
# end
|
66
|
+
#
|
67
|
+
# vertices = repo.reduce([]) do |memo, mod|
|
68
|
+
# package = mod.package
|
69
|
+
# reqs = mod.requires
|
70
|
+
# len = reqs.length
|
71
|
+
# req_modules = reqs.map do |m|
|
72
|
+
# if providers[m].nil?
|
73
|
+
# fail "Dependency not met. Looking for #{m} and could not find it"
|
74
|
+
# else
|
75
|
+
# providers[m]
|
76
|
+
# end
|
77
|
+
# end
|
78
|
+
# memo.concat([mod].cycle().take(len).zip(req_modules).flatten)
|
79
|
+
# end
|
80
|
+
#
|
81
|
+
# x = RGL::DirectedAdjacencyGraph[*vertices]
|
82
|
+
# fail "Graph is cyclic" unless x.acyclic?
|
83
|
+
# x
|
84
|
+
# end
|
85
|
+
#
|
86
|
+
# def get_dependent(graph, you)
|
87
|
+
# graph.bfs_search_tree_from(you)
|
88
|
+
# end
|
89
|
+
#
|
90
|
+
# def to_dot(graph)
|
91
|
+
# graph.write_to_graphic_file('jpg')
|
92
|
+
# end
|
93
|
+
# end
|
94
|
+
# end
|
95
|
+
# end
|