masamune 0.13.2 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/masamune/transform/bulk_upsert.psql.erb +2 -2
- data/lib/masamune/transform/define_table.psql.erb +1 -1
- data/lib/masamune/transform/insert_reference_values.psql.erb +1 -1
- data/lib/masamune/transform/replace_table.psql.erb +2 -2
- data/lib/masamune/transform/stage_dimension.psql.erb +1 -1
- data/lib/masamune/version.rb +1 -1
- data/spec/masamune/transform/bulk_upsert.dimension_spec.rb +4 -4
- data/spec/masamune/transform/define_table.fact_spec.rb +1 -1
- data/spec/masamune/transform/define_table.table_spec.rb +5 -5
- data/spec/masamune/transform/insert_reference_values.dimension_spec.rb +3 -3
- data/spec/masamune/transform/insert_reference_values.fact_spec.rb +6 -6
- data/spec/masamune/transform/rollup_fact_spec.rb +6 -6
- data/spec/masamune/transform/stage_dimension_spec.rb +1 -1
- data/spec/masamune/transform/stage_fact_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 656e76fbaa3b0179ab154a5ae5ae6513dea44639
|
4
|
+
data.tar.gz: d226613e31431e2a5ea7daebcf516e9c88d9a8f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae8eac8dffdb378f44b2ce9494c59d283da2af2a160ecad01ef3d34f5108192009dbd6ca619332b443b433e6f1cda915572f39d698c31dab1a4a10cf35efbd86
|
7
|
+
data.tar.gz: f2574ff50498bfc54eb870b3773c7453241f54337d04c24c174844ac77a09b05c904b44d44fdb3fd6bcd90f88896174b87e09767ad34bb8d838401c89c940886
|
@@ -113,7 +113,7 @@ WHERE NOT EXISTS (SELECT 1 FROM <%= target.name %> WHERE <%= row.insert_constrai
|
|
113
113
|
<%- end -%>
|
114
114
|
|
115
115
|
<%- if helper.perform_analyze? -%>
|
116
|
-
|
116
|
+
ANALYZE <%= target.name %>;
|
117
117
|
<%- end -%>
|
118
118
|
|
119
119
|
<%- if helper.define_functions? -%>
|
@@ -49,10 +49,10 @@ ALTER TABLE <%= source.name %> RENAME TO <%= target.name %>;
|
|
49
49
|
|
50
50
|
<%= render 'define_index.psql.erb', target: target, skip_check_exist: true %>
|
51
51
|
|
52
|
-
VACUUM FULL ANALYZE <%= target.name %>;
|
53
|
-
|
54
52
|
COMMIT;
|
55
53
|
|
54
|
+
VACUUM FULL ANALYZE <%= target.name %>;
|
55
|
+
|
56
56
|
DROP TABLE IF EXISTS <%= target_tmp.name %> CASCADE;
|
57
57
|
DROP TABLE IF EXISTS <%= source.name %> CASCADE;
|
58
58
|
|
data/lib/masamune/version.rb
CHANGED
@@ -127,9 +127,9 @@ describe Masamune::Transform::BulkUpsert do
|
|
127
127
|
user_dimension.start_at IS NULL
|
128
128
|
;
|
129
129
|
|
130
|
-
VACUUM FULL ANALYZE user_dimension;
|
131
|
-
|
132
130
|
COMMIT;
|
131
|
+
|
132
|
+
VACUUM FULL ANALYZE user_dimension;
|
133
133
|
EOS
|
134
134
|
end
|
135
135
|
end
|
@@ -193,9 +193,9 @@ describe Masamune::Transform::BulkUpsert do
|
|
193
193
|
user_dimension_ledger.start_at IS NULL
|
194
194
|
;
|
195
195
|
|
196
|
-
VACUUM FULL ANALYZE user_dimension_ledger;
|
197
|
-
|
198
196
|
COMMIT;
|
197
|
+
|
198
|
+
VACUUM FULL ANALYZE user_dimension_ledger;
|
199
199
|
EOS
|
200
200
|
end
|
201
201
|
end
|
@@ -198,7 +198,7 @@ describe Masamune::Transform::DefineTable do
|
|
198
198
|
CREATE INDEX visits_file_fact_stage_0fe2101_index ON visits_file_fact_stage (user_agent_type_version, time_key);
|
199
199
|
CREATE INDEX visits_file_fact_stage_b0abfed_index ON visits_file_fact_stage (user_dimension_user_id, time_key);
|
200
200
|
|
201
|
-
|
201
|
+
ANALYZE visits_file_fact_stage;
|
202
202
|
EOS
|
203
203
|
end
|
204
204
|
|
@@ -474,7 +474,7 @@ describe Masamune::Transform::DefineTable do
|
|
474
474
|
SELECT 'active'
|
475
475
|
WHERE NOT EXISTS (SELECT 1 FROM user_table WHERE name = 'active');
|
476
476
|
|
477
|
-
|
477
|
+
ANALYZE user_table;
|
478
478
|
EOS
|
479
479
|
end
|
480
480
|
end
|
@@ -574,7 +574,7 @@ describe Masamune::Transform::DefineTable do
|
|
574
574
|
SELECT default_tenant_id(), -2
|
575
575
|
WHERE NOT EXISTS (SELECT 1 FROM user_table WHERE tenant_id = default_tenant_id() AND user_id = -2);
|
576
576
|
|
577
|
-
|
577
|
+
ANALYZE user_table;
|
578
578
|
|
579
579
|
CREATE OR REPLACE FUNCTION default_user_table_user_id()
|
580
580
|
RETURNS INTEGER IMMUTABLE AS $$
|
@@ -902,7 +902,7 @@ describe Masamune::Transform::DefineTable do
|
|
902
902
|
ALTER TABLE user_table ADD CONSTRAINT user_table_3854361_key UNIQUE(tenant_id);
|
903
903
|
END IF; END $$;
|
904
904
|
|
905
|
-
|
905
|
+
ANALYZE user_table;
|
906
906
|
EOS
|
907
907
|
end
|
908
908
|
end
|
@@ -937,7 +937,7 @@ describe Masamune::Transform::DefineTable do
|
|
937
937
|
CREATE INDEX user_table_e8701ad_index ON user_table (user_id);
|
938
938
|
END IF; END $$;
|
939
939
|
|
940
|
-
|
940
|
+
ANALYZE user_table;
|
941
941
|
EOS
|
942
942
|
end
|
943
943
|
end
|
@@ -975,7 +975,7 @@ describe Masamune::Transform::DefineTable do
|
|
975
975
|
ALTER TABLE user_table ADD CONSTRAINT user_table_bd2027e_fkey FOREIGN KEY (user_account_state_table_id) REFERENCES user_account_state_table(id);
|
976
976
|
END IF; END $$;
|
977
977
|
|
978
|
-
|
978
|
+
ANALYZE user_table;
|
979
979
|
EOS
|
980
980
|
end
|
981
981
|
end
|
@@ -74,7 +74,7 @@ describe Masamune::Transform::InsertReferenceValues do
|
|
74
74
|
department_type_department_id IS NOT NULL
|
75
75
|
;
|
76
76
|
|
77
|
-
|
77
|
+
ANALYZE department_type_stage;
|
78
78
|
|
79
79
|
BEGIN;
|
80
80
|
LOCK TABLE department_type IN EXCLUSIVE MODE;
|
@@ -96,9 +96,9 @@ describe Masamune::Transform::InsertReferenceValues do
|
|
96
96
|
department_type.department_id IS NULL
|
97
97
|
;
|
98
98
|
|
99
|
-
VACUUM FULL ANALYZE department_type;
|
100
|
-
|
101
99
|
COMMIT;
|
100
|
+
|
101
|
+
VACUUM FULL ANALYZE department_type;
|
102
102
|
EOS
|
103
103
|
end
|
104
104
|
end
|
@@ -91,7 +91,7 @@ describe Masamune::Transform::InsertReferenceValues do
|
|
91
91
|
user_agent_type_name IS NOT NULL
|
92
92
|
;
|
93
93
|
|
94
|
-
|
94
|
+
ANALYZE user_agent_type_stage;
|
95
95
|
|
96
96
|
BEGIN;
|
97
97
|
LOCK TABLE user_agent_type IN EXCLUSIVE MODE;
|
@@ -113,10 +113,10 @@ describe Masamune::Transform::InsertReferenceValues do
|
|
113
113
|
user_agent_type.version IS NULL
|
114
114
|
;
|
115
115
|
|
116
|
-
VACUUM FULL ANALYZE user_agent_type;
|
117
|
-
|
118
116
|
COMMIT;
|
119
117
|
|
118
|
+
VACUUM FULL ANALYZE user_agent_type;
|
119
|
+
|
120
120
|
CREATE TEMPORARY TABLE IF NOT EXISTS feature_type_stage (LIKE feature_type INCLUDING ALL);
|
121
121
|
|
122
122
|
INSERT INTO
|
@@ -129,7 +129,7 @@ describe Masamune::Transform::InsertReferenceValues do
|
|
129
129
|
feature_type_name IS NOT NULL
|
130
130
|
;
|
131
131
|
|
132
|
-
|
132
|
+
ANALYZE feature_type_stage;
|
133
133
|
|
134
134
|
BEGIN;
|
135
135
|
LOCK TABLE feature_type IN EXCLUSIVE MODE;
|
@@ -148,9 +148,9 @@ describe Masamune::Transform::InsertReferenceValues do
|
|
148
148
|
feature_type.name IS NULL
|
149
149
|
;
|
150
150
|
|
151
|
-
VACUUM FULL ANALYZE feature_type;
|
152
|
-
|
153
151
|
COMMIT;
|
152
|
+
|
153
|
+
VACUUM FULL ANALYZE feature_type;
|
154
154
|
EOS
|
155
155
|
end
|
156
156
|
end
|
@@ -172,10 +172,10 @@ describe Masamune::Transform::RollupFact do
|
|
172
172
|
CREATE INDEX visits_hourly_fact_y2014m08_d8b1c3e_index ON visits_hourly_fact_y2014m08 (user_agent_type_id);
|
173
173
|
CREATE INDEX visits_hourly_fact_y2014m08_39f0fdd_index ON visits_hourly_fact_y2014m08 (user_dimension_id);
|
174
174
|
|
175
|
-
VACUUM FULL ANALYZE visits_hourly_fact_y2014m08;
|
176
|
-
|
177
175
|
COMMIT;
|
178
176
|
|
177
|
+
VACUUM FULL ANALYZE visits_hourly_fact_y2014m08;
|
178
|
+
|
179
179
|
DROP TABLE IF EXISTS visits_hourly_fact_y2014m08_stage_tmp CASCADE;
|
180
180
|
DROP TABLE IF EXISTS visits_hourly_fact_y2014m08_stage CASCADE;
|
181
181
|
|
@@ -274,10 +274,10 @@ describe Masamune::Transform::RollupFact do
|
|
274
274
|
CREATE INDEX visits_daily_fact_y2014m08_d8b1c3e_index ON visits_daily_fact_y2014m08 (user_agent_type_id);
|
275
275
|
CREATE INDEX visits_daily_fact_y2014m08_39f0fdd_index ON visits_daily_fact_y2014m08 (user_dimension_id);
|
276
276
|
|
277
|
-
VACUUM FULL ANALYZE visits_daily_fact_y2014m08;
|
278
|
-
|
279
277
|
COMMIT;
|
280
278
|
|
279
|
+
VACUUM FULL ANALYZE visits_daily_fact_y2014m08;
|
280
|
+
|
281
281
|
DROP TABLE IF EXISTS visits_daily_fact_y2014m08_stage_tmp CASCADE;
|
282
282
|
DROP TABLE IF EXISTS visits_daily_fact_y2014m08_stage CASCADE;
|
283
283
|
|
@@ -376,10 +376,10 @@ describe Masamune::Transform::RollupFact do
|
|
376
376
|
CREATE INDEX visits_monthly_fact_y2014m08_d8b1c3e_index ON visits_monthly_fact_y2014m08 (user_agent_type_id);
|
377
377
|
CREATE INDEX visits_monthly_fact_y2014m08_39f0fdd_index ON visits_monthly_fact_y2014m08 (user_dimension_id);
|
378
378
|
|
379
|
-
VACUUM FULL ANALYZE visits_monthly_fact_y2014m08;
|
380
|
-
|
381
379
|
COMMIT;
|
382
380
|
|
381
|
+
VACUUM FULL ANALYZE visits_monthly_fact_y2014m08;
|
382
|
+
|
383
383
|
DROP TABLE IF EXISTS visits_monthly_fact_y2014m08_stage_tmp CASCADE;
|
384
384
|
DROP TABLE IF EXISTS visits_monthly_fact_y2014m08_stage CASCADE;
|
385
385
|
|
@@ -110,7 +110,7 @@ describe Masamune::Transform::StageDimension do
|
|
110
110
|
hr_user_account_state_type.name = user_file_dimension_ledger_stage.hr_user_account_state_type_name
|
111
111
|
;
|
112
112
|
|
113
|
-
|
113
|
+
ANALYZE user_dimension_ledger_stage;
|
114
114
|
EOS
|
115
115
|
end
|
116
116
|
end
|
@@ -237,10 +237,10 @@ describe Masamune::Transform::StageFact do
|
|
237
237
|
CREATE INDEX visits_hourly_fact_y2014m08_d8b1c3e_index ON visits_hourly_fact_y2014m08 (user_agent_type_id);
|
238
238
|
CREATE INDEX visits_hourly_fact_y2014m08_39f0fdd_index ON visits_hourly_fact_y2014m08 (user_dimension_id);
|
239
239
|
|
240
|
-
VACUUM FULL ANALYZE visits_hourly_fact_y2014m08;
|
241
|
-
|
242
240
|
COMMIT;
|
243
241
|
|
242
|
+
VACUUM FULL ANALYZE visits_hourly_fact_y2014m08;
|
243
|
+
|
244
244
|
DROP TABLE IF EXISTS visits_hourly_fact_y2014m08_stage_tmp CASCADE;
|
245
245
|
DROP TABLE IF EXISTS visits_hourly_fact_y2014m08_stage CASCADE;
|
246
246
|
|