gooddata 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. checksums.yaml +4 -4
  2. data/.document +0 -0
  3. data/.editorconfig +0 -0
  4. data/.flayignore +1 -0
  5. data/.rubocop.yml +2 -0
  6. data/.yardopts +0 -0
  7. data/CHANGELOG.md +9 -0
  8. data/CLI.md +0 -0
  9. data/Gemfile +0 -0
  10. data/Guardfile +0 -0
  11. data/LICENSE +0 -0
  12. data/LICENSE.rb +0 -0
  13. data/TODO.md +0 -0
  14. data/dependency_decisions.yml +0 -0
  15. data/gooddata.gemspec +1 -0
  16. data/lib/gooddata/app/app.rb +0 -0
  17. data/lib/gooddata/bricks/brick.rb +0 -0
  18. data/lib/gooddata/bricks/bricks.rb +0 -0
  19. data/lib/gooddata/bricks/middleware/base_middleware.rb +0 -0
  20. data/lib/gooddata/bricks/middleware/bench_middleware.rb +0 -0
  21. data/lib/gooddata/bricks/middleware/bulk_salesforce_middleware.rb +0 -0
  22. data/lib/gooddata/bricks/middleware/decode_params_middleware.rb +0 -0
  23. data/lib/gooddata/bricks/middleware/fs_download_middleware.rb +0 -0
  24. data/lib/gooddata/bricks/middleware/fs_upload_middleware.rb +0 -0
  25. data/lib/gooddata/bricks/middleware/middleware.rb +0 -0
  26. data/lib/gooddata/bricks/middleware/stdout_middleware.rb +0 -0
  27. data/lib/gooddata/bricks/middleware/twitter_middleware.rb +0 -0
  28. data/lib/gooddata/bricks/middleware/undot_params_middleware.rb +0 -0
  29. data/lib/gooddata/bricks/pipeline.rb +0 -0
  30. data/lib/gooddata/bricks/utils.rb +0 -0
  31. data/lib/gooddata/cli/cli.rb +0 -0
  32. data/lib/gooddata/cli/commands/auth_cmd.rb +0 -0
  33. data/lib/gooddata/cli/commands/domain_cmd.rb +0 -0
  34. data/lib/gooddata/cli/commands/project_cmd.rb +0 -0
  35. data/lib/gooddata/cli/hooks.rb +0 -0
  36. data/lib/gooddata/cli/shared.rb +0 -0
  37. data/lib/gooddata/cli/terminal.rb +0 -0
  38. data/lib/gooddata/commands/api.rb +0 -0
  39. data/lib/gooddata/commands/auth.rb +0 -0
  40. data/lib/gooddata/commands/base.rb +0 -0
  41. data/lib/gooddata/commands/commands.rb +0 -0
  42. data/lib/gooddata/commands/datasets.rb +0 -0
  43. data/lib/gooddata/commands/datawarehouse.rb +0 -0
  44. data/lib/gooddata/commands/domain.rb +0 -0
  45. data/lib/gooddata/commands/process.rb +0 -0
  46. data/lib/gooddata/commands/project.rb +0 -0
  47. data/lib/gooddata/commands/projects.rb +0 -0
  48. data/lib/gooddata/commands/role.rb +0 -0
  49. data/lib/gooddata/commands/runners.rb +0 -0
  50. data/lib/gooddata/commands/scaffold.rb +0 -0
  51. data/lib/gooddata/commands/user.rb +0 -0
  52. data/lib/gooddata/connection.rb +0 -0
  53. data/lib/gooddata/core/core.rb +0 -0
  54. data/lib/gooddata/core/logging.rb +0 -0
  55. data/lib/gooddata/core/nil_logger.rb +0 -0
  56. data/lib/gooddata/core/project.rb +0 -0
  57. data/lib/gooddata/core/rest.rb +0 -0
  58. data/lib/gooddata/core/user.rb +0 -0
  59. data/lib/gooddata/data/data.rb +0 -0
  60. data/lib/gooddata/data/guesser.rb +0 -0
  61. data/lib/gooddata/exceptions/attr_element_not_found.rb +0 -0
  62. data/lib/gooddata/exceptions/command_failed.rb +0 -0
  63. data/lib/gooddata/exceptions/exceptions.rb +0 -0
  64. data/lib/gooddata/exceptions/execution_limit_exceeded.rb +0 -0
  65. data/lib/gooddata/exceptions/export_clone.rb +0 -0
  66. data/lib/gooddata/exceptions/filter_maqlization.rb +0 -0
  67. data/lib/gooddata/exceptions/import_clone.rb +0 -0
  68. data/lib/gooddata/exceptions/malformed_user.rb +0 -0
  69. data/lib/gooddata/exceptions/maql_execution.rb +0 -0
  70. data/lib/gooddata/exceptions/object_migration.rb +0 -0
  71. data/lib/gooddata/exceptions/project_not_found.rb +0 -0
  72. data/lib/gooddata/exceptions/segment_not_empty.rb +0 -0
  73. data/lib/gooddata/exceptions/uncomputable_report.rb +0 -0
  74. data/lib/gooddata/exceptions/user_in_different_domain.rb +0 -0
  75. data/lib/gooddata/exceptions/validation_error.rb +0 -0
  76. data/lib/gooddata/extensions/big_decimal.rb +0 -0
  77. data/lib/gooddata/extensions/class.rb +0 -0
  78. data/lib/gooddata/extensions/extensions.rb +0 -0
  79. data/lib/gooddata/extensions/false.rb +0 -0
  80. data/lib/gooddata/extensions/hash.rb +0 -0
  81. data/lib/gooddata/extensions/integer.rb +0 -0
  82. data/lib/gooddata/extensions/nil.rb +0 -0
  83. data/lib/gooddata/extensions/numeric.rb +0 -0
  84. data/lib/gooddata/extensions/object.rb +0 -0
  85. data/lib/gooddata/extensions/string.rb +0 -0
  86. data/lib/gooddata/extensions/symbol.rb +0 -0
  87. data/lib/gooddata/extensions/true.rb +0 -0
  88. data/lib/gooddata/extract.rb +0 -0
  89. data/lib/gooddata/goodzilla/goodzilla.rb +0 -0
  90. data/lib/gooddata/helpers/auth_helpers.rb +0 -0
  91. data/lib/gooddata/helpers/csv_helper.rb +0 -0
  92. data/lib/gooddata/helpers/erb_helper.rb +0 -0
  93. data/lib/gooddata/helpers/global_helpers.rb +0 -0
  94. data/lib/gooddata/helpers/helpers.rb +0 -0
  95. data/lib/gooddata/lcm/actions/actions.rb +0 -0
  96. data/lib/gooddata/lcm/actions/base_action.rb +0 -0
  97. data/lib/gooddata/lcm/actions/synchronize_clients.rb +8 -6
  98. data/lib/gooddata/lcm/data/create_lcm_release.sql.erb +0 -0
  99. data/lib/gooddata/lcm/data/insert_into_lcm_release.sql.erb +0 -0
  100. data/lib/gooddata/lcm/data/select_from_lcm_release.sql.erb +0 -0
  101. data/lib/gooddata/lcm/data/update_lcm_release.sql.erb +0 -0
  102. data/lib/gooddata/lcm/dsl/dsl.rb +0 -0
  103. data/lib/gooddata/lcm/dsl/params_dsl.rb +0 -0
  104. data/lib/gooddata/lcm/helpers/helpers.rb +0 -0
  105. data/lib/gooddata/lcm/lcm2.rb +4 -6
  106. data/lib/gooddata/lcm/types/base_type.rb +0 -0
  107. data/lib/gooddata/lcm/types/class/ads_client.rb +0 -0
  108. data/lib/gooddata/lcm/types/class/class.rb +0 -0
  109. data/lib/gooddata/lcm/types/class/gd_client.rb +0 -0
  110. data/lib/gooddata/lcm/types/class/types.rb +0 -0
  111. data/lib/gooddata/lcm/types/complex/complex.rb +0 -0
  112. data/lib/gooddata/lcm/types/complex/release_query.rb +0 -0
  113. data/lib/gooddata/lcm/types/complex/tokens.rb +0 -0
  114. data/lib/gooddata/lcm/types/complex/types.rb +0 -0
  115. data/lib/gooddata/lcm/types/param.rb +0 -0
  116. data/lib/gooddata/lcm/types/scalar/bool.rb +0 -0
  117. data/lib/gooddata/lcm/types/scalar/hash.rb +0 -0
  118. data/lib/gooddata/lcm/types/scalar/integer.rb +0 -0
  119. data/lib/gooddata/lcm/types/scalar/object.rb +0 -0
  120. data/lib/gooddata/lcm/types/scalar/string.rb +0 -0
  121. data/lib/gooddata/lcm/types/scalar/types.rb +0 -0
  122. data/lib/gooddata/lcm/types/special/types.rb +0 -0
  123. data/lib/gooddata/lcm/types/types.rb +0 -0
  124. data/lib/gooddata/mixins/author.rb +0 -0
  125. data/lib/gooddata/mixins/content_getter.rb +0 -0
  126. data/lib/gooddata/mixins/content_property_reader.rb +0 -0
  127. data/lib/gooddata/mixins/content_property_writer.rb +0 -0
  128. data/lib/gooddata/mixins/contributor.rb +0 -0
  129. data/lib/gooddata/mixins/data_getter.rb +0 -0
  130. data/lib/gooddata/mixins/data_property_reader.rb +0 -0
  131. data/lib/gooddata/mixins/data_property_writer.rb +0 -0
  132. data/lib/gooddata/mixins/inspector.rb +0 -0
  133. data/lib/gooddata/mixins/is_attribute.rb +0 -0
  134. data/lib/gooddata/mixins/is_dimension.rb +0 -0
  135. data/lib/gooddata/mixins/is_fact.rb +0 -0
  136. data/lib/gooddata/mixins/is_folder.rb +0 -0
  137. data/lib/gooddata/mixins/is_label.rb +0 -0
  138. data/lib/gooddata/mixins/links.rb +0 -0
  139. data/lib/gooddata/mixins/md_grantees.rb +0 -0
  140. data/lib/gooddata/mixins/md_lock.rb +0 -0
  141. data/lib/gooddata/mixins/md_object_id.rb +0 -0
  142. data/lib/gooddata/mixins/md_relations.rb +0 -0
  143. data/lib/gooddata/mixins/meta_getter.rb +0 -0
  144. data/lib/gooddata/mixins/meta_property_reader.rb +0 -0
  145. data/lib/gooddata/mixins/meta_property_writer.rb +0 -0
  146. data/lib/gooddata/mixins/mixins.rb +0 -0
  147. data/lib/gooddata/mixins/not_attribute.rb +0 -0
  148. data/lib/gooddata/mixins/not_exportable.rb +0 -0
  149. data/lib/gooddata/mixins/not_fact.rb +0 -0
  150. data/lib/gooddata/mixins/not_group.rb +0 -0
  151. data/lib/gooddata/mixins/not_label.rb +0 -0
  152. data/lib/gooddata/mixins/not_metric.rb +0 -0
  153. data/lib/gooddata/mixins/obj_id.rb +0 -0
  154. data/lib/gooddata/mixins/rest_getters.rb +0 -0
  155. data/lib/gooddata/mixins/rest_resource.rb +0 -0
  156. data/lib/gooddata/mixins/root_key_getter.rb +0 -0
  157. data/lib/gooddata/mixins/root_key_setter.rb +0 -0
  158. data/lib/gooddata/mixins/timestamps.rb +0 -0
  159. data/lib/gooddata/mixins/to_json.rb +0 -0
  160. data/lib/gooddata/mixins/uri_getter.rb +0 -0
  161. data/lib/gooddata/models/ads_output_stage.rb +0 -0
  162. data/lib/gooddata/models/automated_data_distribution.rb +0 -0
  163. data/lib/gooddata/models/blueprint/anchor_field.rb +0 -0
  164. data/lib/gooddata/models/blueprint/attribute_field.rb +0 -0
  165. data/lib/gooddata/models/blueprint/blueprint.rb +0 -0
  166. data/lib/gooddata/models/blueprint/blueprint_field.rb +0 -0
  167. data/lib/gooddata/models/blueprint/dashboard_builder.rb +0 -0
  168. data/lib/gooddata/models/blueprint/dataset_blueprint.rb +0 -0
  169. data/lib/gooddata/models/blueprint/fact_field.rb +0 -0
  170. data/lib/gooddata/models/blueprint/label_field.rb +0 -0
  171. data/lib/gooddata/models/blueprint/reference_field.rb +0 -0
  172. data/lib/gooddata/models/blueprint/schema_blueprint.rb +0 -0
  173. data/lib/gooddata/models/blueprint/schema_builder.rb +0 -0
  174. data/lib/gooddata/models/blueprint/to_manifest.rb +0 -0
  175. data/lib/gooddata/models/channel_configuration.rb +0 -0
  176. data/lib/gooddata/models/client_synchronization_result.rb +0 -0
  177. data/lib/gooddata/models/client_synchronization_result_details.rb +0 -0
  178. data/lib/gooddata/models/datawarehouse.rb +0 -0
  179. data/lib/gooddata/models/execution.rb +0 -0
  180. data/lib/gooddata/models/execution_detail.rb +0 -0
  181. data/lib/gooddata/models/invitation.rb +0 -0
  182. data/lib/gooddata/models/links.rb +0 -0
  183. data/lib/gooddata/models/metadata/dashboard/dashboard_item.rb +0 -0
  184. data/lib/gooddata/models/metadata/dashboard/filter_apply_item.rb +0 -0
  185. data/lib/gooddata/models/metadata/dashboard/filter_item.rb +0 -0
  186. data/lib/gooddata/models/metadata/dashboard/geo_chart_item.rb +0 -0
  187. data/lib/gooddata/models/metadata/dashboard/headline_item.rb +0 -0
  188. data/lib/gooddata/models/metadata/dashboard/iframe_item.rb +0 -0
  189. data/lib/gooddata/models/metadata/dashboard/report_item.rb +0 -0
  190. data/lib/gooddata/models/metadata/dashboard/text_item.rb +0 -0
  191. data/lib/gooddata/models/metadata/dashboard_tab.rb +0 -0
  192. data/lib/gooddata/models/metadata/label.rb +43 -23
  193. data/lib/gooddata/models/metadata/metadata.rb +0 -0
  194. data/lib/gooddata/models/metadata/scheduled_mail/dashboard_attachment.rb +0 -0
  195. data/lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb +0 -0
  196. data/lib/gooddata/models/models.rb +0 -0
  197. data/lib/gooddata/models/module_constants.rb +0 -0
  198. data/lib/gooddata/models/notification_rule.rb +0 -0
  199. data/lib/gooddata/models/project_log_formatter.rb +0 -0
  200. data/lib/gooddata/models/project_metadata.rb +0 -0
  201. data/lib/gooddata/models/tab_builder.rb +0 -0
  202. data/lib/gooddata/models/user_filters/mandatory_user_filter.rb +0 -0
  203. data/lib/gooddata/models/user_filters/user_filter_builder.rb +2 -1
  204. data/lib/gooddata/models/user_filters/user_filters.rb +0 -0
  205. data/lib/gooddata/rest/README.md +0 -0
  206. data/lib/gooddata/rest/connection.rb +2 -70
  207. data/lib/gooddata/rest/object.rb +0 -0
  208. data/lib/gooddata/rest/phmap.rb +81 -0
  209. data/lib/gooddata/rest/resource.rb +0 -0
  210. data/lib/gooddata/rest/rest.rb +0 -0
  211. data/lib/gooddata/version.rb +1 -1
  212. data/lib/templates/bricks/brick.rb.erb +0 -0
  213. data/lib/templates/bricks/main.rb.erb +0 -0
  214. data/lib/templates/project/Goodfile.erb +0 -0
  215. data/lib/templates/project/data/commits.csv +0 -0
  216. data/lib/templates/project/data/devs.csv +0 -0
  217. data/lib/templates/project/data/repos.csv +0 -0
  218. data/lib/templates/project/model/model.rb.erb +0 -0
  219. data/spec/.rubocop.yml +0 -0
  220. data/spec/bricks/bricks_spec.rb +0 -0
  221. data/spec/bricks/default-config.json +0 -0
  222. data/spec/data/.gooddata +0 -0
  223. data/spec/data/blueprints/additional_dataset_module.json +0 -0
  224. data/spec/data/blueprints/attribute_sort_order_blueprint.json +0 -0
  225. data/spec/data/blueprints/big_blueprint_not_pruned.json +0 -0
  226. data/spec/data/blueprints/m_n_model.json +0 -0
  227. data/spec/data/blueprints/model_module.json +0 -0
  228. data/spec/data/cc/data/source/commits.csv +0 -0
  229. data/spec/data/cc/data/source/devs.csv +0 -0
  230. data/spec/data/cc/data/source/repos.csv +0 -0
  231. data/spec/data/cc/devel.prm +0 -0
  232. data/spec/data/cc/graph/graph.grf +0 -0
  233. data/spec/data/cc/workspace.prm +0 -0
  234. data/spec/data/column_based_permissions.csv +0 -0
  235. data/spec/data/column_based_permissions2.csv +0 -0
  236. data/spec/data/gd_gse_data_blueprint.json +0 -0
  237. data/spec/data/gd_gse_data_manifest.json +0 -0
  238. data/spec/data/gd_gse_data_model.json +0 -0
  239. data/spec/data/gooddata_version_process/gooddata_version.rb +0 -0
  240. data/spec/data/gooddata_version_process/gooddata_version.zip +0 -0
  241. data/spec/data/hello_world_process/hello_world.rb +0 -0
  242. data/spec/data/hello_world_process/hello_world.zip +0 -0
  243. data/spec/data/integration_model.json +252 -0
  244. data/spec/data/integration_policies.csv +9134 -0
  245. data/spec/data/line_based_permissions.csv +0 -0
  246. data/spec/data/manifests/test_blueprint.json +0 -0
  247. data/spec/data/manifests/test_project.json +0 -0
  248. data/spec/data/reports/left_attr_report.json +0 -0
  249. data/spec/data/reports/metric_only_one_line.json +0 -0
  250. data/spec/data/reports/report_1.json +0 -0
  251. data/spec/data/reports/top_attr_report.json +0 -0
  252. data/spec/data/ruby_params_process/ruby_params.rb +0 -0
  253. data/spec/data/ruby_process/deep_files/deep_stuff.txt +0 -0
  254. data/spec/data/ruby_process/process.rb +0 -0
  255. data/spec/data/ruby_process/stuff.txt +0 -0
  256. data/spec/data/superfluous_titles_view.json +0 -0
  257. data/spec/data/test-ci-data.csv +0 -0
  258. data/spec/data/users.csv +0 -0
  259. data/spec/data/wire_models/attribute_sort_by_model.json +0 -0
  260. data/spec/data/wire_models/model_view.json +0 -0
  261. data/spec/data/wire_models/nu_model.json +0 -0
  262. data/spec/data/wire_test_project.json +0 -0
  263. data/spec/environment/default.rb +0 -0
  264. data/spec/environment/environment.rb +0 -0
  265. data/spec/environment/production.rb +0 -0
  266. data/spec/helpers/appstore_project_helper.rb +221 -0
  267. data/spec/helpers/blueprint_helper.rb +0 -0
  268. data/spec/helpers/cli_helper.rb +0 -0
  269. data/spec/helpers/connection_helper.rb +0 -0
  270. data/spec/helpers/constants.rb +32 -0
  271. data/spec/helpers/crypto_helper.rb +0 -0
  272. data/spec/helpers/csv_helper.rb +0 -0
  273. data/spec/helpers/spec_helper.rb +0 -0
  274. data/spec/integration/blueprint_updates_spec.rb +0 -0
  275. data/spec/integration/blueprint_with_grain_spec.rb +0 -0
  276. data/spec/integration/channel_configuration_spec.rb +0 -0
  277. data/spec/integration/command_projects_spec.rb +0 -0
  278. data/spec/integration/create_project_spec.rb +0 -0
  279. data/spec/integration/date_dim_switch_spec.rb +6 -2
  280. data/spec/integration/deprecated_load_spec.rb +0 -0
  281. data/spec/integration/models/label_spec.rb +40 -0
  282. data/spec/integration/over_to_user_filters_spec.rb +0 -0
  283. data/spec/integration/partial_md_export_import_spec.rb +0 -0
  284. data/spec/integration/rest_spec.rb +0 -0
  285. data/spec/integration/schedule_spec.rb +0 -0
  286. data/spec/integration/user_group_spec.rb +0 -0
  287. data/spec/logging_in_logging_out_spec.rb +0 -0
  288. data/spec/unit/actions/synchronize_clients_spec.rb +71 -0
  289. data/spec/unit/bricks/bricks_spec.rb +0 -0
  290. data/spec/unit/bricks/middleware/bench_middleware_spec.rb +0 -0
  291. data/spec/unit/bricks/middleware/bulk_salesforce_middleware_spec.rb +0 -0
  292. data/spec/unit/bricks/middleware/gooddata_middleware_spec.rb +0 -0
  293. data/spec/unit/bricks/middleware/restforce_middleware_spec.rb +0 -0
  294. data/spec/unit/bricks/middleware/stdout_middleware_spec.rb +0 -0
  295. data/spec/unit/bricks/middleware/twitter_middleware_spec.rb +0 -0
  296. data/spec/unit/cli/cli_spec.rb +0 -0
  297. data/spec/unit/cli/commands/cmd_auth_spec.rb +0 -0
  298. data/spec/unit/core/nil_logger_spec.rb +0 -0
  299. data/spec/unit/extensions/hash_spec.rb +0 -0
  300. data/spec/unit/godzilla/goodzilla_spec.rb +0 -0
  301. data/spec/unit/helpers/csv_helper_spec.rb +0 -0
  302. data/spec/unit/lcm/lcm2_spec.rb +36 -0
  303. data/spec/unit/models/blueprint/attribute_sort_by_spec.rb +0 -0
  304. data/spec/unit/models/blueprint/attributes_spec.rb +0 -0
  305. data/spec/unit/models/blueprint/dataset_spec.rb +0 -0
  306. data/spec/unit/models/blueprint/{labels_spec.rb → label_blueprint_field_spec.rb} +7 -7
  307. data/spec/unit/models/blueprint/reference_spec.rb +0 -0
  308. data/spec/unit/models/blueprint/schema_builder_spec.rb +0 -0
  309. data/spec/unit/models/blueprint/to_wire_spec.rb +0 -0
  310. data/spec/unit/models/execution_spec.rb +0 -0
  311. data/spec/unit/models/from_wire_spec.rb +0 -0
  312. data/spec/unit/models/metric_spec.rb +0 -0
  313. data/spec/unit/models/model_spec.rb +0 -0
  314. data/spec/unit/models/report_result_data_spec.rb +0 -0
  315. data/spec/unit/models/user_filters/user_filter_builder_spec.rb +5 -4
  316. data/spec/unit/models/user_filters_spec.rb +0 -0
  317. data/spec/unit/models/variable_spec.rb +0 -0
  318. data/spec/unit/rest/resource_spec.rb +0 -0
  319. metadata +20 -5
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -42,28 +42,17 @@ module GoodData
42
42
 
43
43
  # Gets valid elements using /validElements? API
44
44
  # @return [Array] Results
45
- def get_valid_elements(url_or_params = {}, request_payload = {})
46
- final_url = url_or_params
47
-
48
- if url_or_params.is_a?(Hash)
49
- default_params = {
50
- limit: 1,
51
- offset: 0,
52
- order: 'asc'
53
- }
54
- params = default_params.merge(url_or_params).map { |x, v| "#{x}=#{CGI.escape(v.to_s)}" }.reduce { |acc, elem| "#{acc}&#{elem}" }
55
- final_url = "#{uri}/validElements?#{params}"
56
- end
57
-
58
- results = client.post(final_url, 'validElementsRequest' => request_payload)
59
-
60
- # Implementation of polling is based on
61
- # https://opengrok.intgdc.com/source/xref/gdc-backend/src/test/java/com/gooddata/service/dao/ValidElementsDaoTest.java
62
- status_url = results['uri']
63
- if status_url
64
- results = client.poll_on_response(status_url) do |body|
65
- status = body['taskState'] && body['taskState']['status']
66
- status == 'RUNNING' || status == 'PREPARED'
45
+ def get_valid_elements(*args)
46
+ results, params = valid_elements(*args)
47
+ # TMA-775 - the validElements API can possibly return more matches than requested (usually 1)
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]
50
+ params[:limit] = 100_000
51
+ results, = valid_elements params
52
+ if params[:filter]
53
+ results['validElements']['items'] = results['validElements']['items'].reject do |i|
54
+ i['element']['title'] != params[:filter]
55
+ end
67
56
  end
68
57
  end
69
58
 
@@ -106,7 +95,7 @@ module GoodData
106
95
  end
107
96
 
108
97
  def values_count
109
- results = get_valid_elements
98
+ results, = valid_elements
110
99
  count = GoodData::Helpers.get_path(results, %w(validElements paging total))
111
100
  count && count.to_i
112
101
  end
@@ -122,6 +111,37 @@ module GoodData
122
111
  def attribute_uri
123
112
  content['formOf']
124
113
  end
114
+
115
+ private
116
+
117
+ def valid_elements(url_or_params = {}, request_payload = {})
118
+ final_url = url_or_params
119
+
120
+ if url_or_params.is_a?(Hash)
121
+ default_params = {
122
+ limit: 1,
123
+ offset: 0,
124
+ order: 'asc'
125
+ }
126
+ params = default_params.merge(url_or_params)
127
+ query_params = params.map { |x, v| "#{x}=#{CGI.escape(v.to_s)}" }.reduce { |acc, elem| "#{acc}&#{elem}" }
128
+ final_url = "#{uri}/validElements?#{query_params}"
129
+ end
130
+
131
+ results = client.post(final_url, 'validElementsRequest' => request_payload)
132
+
133
+ # Implementation of polling is based on
134
+ # https://opengrok.intgdc.com/source/xref/gdc-backend/src/test/java/com/gooddata/service/dao/ValidElementsDaoTest.java
135
+ status_url = results['uri']
136
+ if status_url
137
+ results = client.poll_on_response(status_url) do |body|
138
+ status = body['taskState'] && body['taskState']['status']
139
+ status == 'RUNNING' || status == 'PREPARED'
140
+ end
141
+ end
142
+
143
+ [results, params]
144
+ end
125
145
  end
126
146
  end
127
147
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -140,10 +140,11 @@ module GoodData
140
140
 
141
141
  def self.create_label_cache(result, options = {})
142
142
  project = options[:project]
143
+ project_labels = project.labels
143
144
 
144
145
  result.reduce({}) do |a, e|
145
146
  e[:filters].map do |filter|
146
- a[filter[:label]] = project.labels(filter[:label]) unless a.key?(filter[:label])
147
+ a[filter[:label]] = project_labels.find { |l| (l.identifier == filter[:label]) || (l.uri == filter[:label]) } unless a.key?(filter[:label])
147
148
  end
148
149
  a
149
150
  end
File without changes
@@ -15,6 +15,8 @@ require_relative '../exceptions/exceptions'
15
15
 
16
16
  require_relative '../helpers/global_helpers'
17
17
 
18
+ require_relative 'phmap'
19
+
18
20
  module RestClient
19
21
  module AbstractResponse
20
22
  alias_method :old_follow_redirection, :follow_redirection
@@ -647,76 +649,6 @@ ERR
647
649
  new_params
648
650
  end
649
651
 
650
- # TODO: Store PH_MAP for wildcarding of URLs in reports in separate file
651
- PH_MAP = [
652
- ['/gdc/account/profile/{id}', %r{/gdc/account/profile/[\w]+}],
653
- ['/gdc/account/login/{id}', %r{/gdc/account/login/[\w]+}],
654
- ['/gdc/account/domains/{id}/users?login={login}', %r{/gdc/account/domains/[\w\d-]+/users\?login=[^&$]+}],
655
- ['/gdc/account/domains/{id}', %r{/gdc/account/domains/[\w\d-]+}],
656
-
657
- ['/gdc/projects/{id}/execute', %r{/gdc/projects/[\w]+/execute}],
658
-
659
- ['/gdc/datawarehouse/instances/{id}', %r{/gdc/datawarehouse/instances/[\w]+}],
660
- ['/gdc/datawarehouse/executions/{id}', %r{/gdc/datawarehouse/executions/[\w]+}],
661
-
662
- ['/gdc/domains/{id}/segments/{segment}/synchronizeClients/results/{result}/details?offset={offset}&limit={limit}',
663
- %r{/gdc/domains/[\w-]+/segments/[\w-]+/synchronizeClients/results/[\w]+/details/\?offset=[\d]+&limit=[\d]+}],
664
- ['/gdc/domains/{id}/segments/{segment}/synchronizeClients/results/{result}',
665
- %r{/gdc/domains/[\w-]+/segments/[\w-]+/synchronizeClients/results/[\w]+}],
666
- ['/gdc/domains/{id}/segments/{segment}/', %r{/gdc/domains/[\w-]+/segments/[\w-]+/}],
667
- ['/gdc/domains/{id}/segments/{segment}', %r{/gdc/domains/[\w-]+/segments/[\w-]+}],
668
- ['/gdc/domains/{id}/clients?segment={segment}', %r{/gdc/domains/[\w-]+/clients\?segment=[\w-]+}],
669
- ['/gdc/domains/{id}/clients/{client_id}/settings/lcm.title', %r{/gdc/domains/[\w-]+/clients/[\w-]+/settings/lcm.title}],
670
- ['/gdc/domains/{id}/clients/{client_id}/settings/lcm.token', %r{/gdc/domains/[\w-]+/clients/[\w-]+/settings/lcm.token}],
671
- ['/gdc/domains/{id}/clients/{client_id}', %r{/gdc/domains/[\w-]+/clients/[\w-]+}],
672
- ['/gdc/domains/{id}/provisionClientProjects/results/{result}/details?offset={offset}&limit={limit}',
673
- %r{/gdc/domains/[\w-]+/provisionClientProjects/results/[\w]+/details/\?offset=[\d]+&limit=[\d]+}],
674
- ['/gdc/domains/{id}/provisionClientProjects/results/{result}', %r{/gdc/domains/[\w-]+/provisionClientProjects/results/[\w]+}],
675
- ['/gdc/domains/{id}/provisionClientProjects', %r{/gdc/domains/[\w-]+/provisionClientProjects}],
676
- ['/gdc/domains/{id}/updateClients', %r{/gdc/domains/[\w-]+/updateClients}],
677
- ['/gdc/domains/{id}/', %r{/gdc/domains/[\w-]+/}],
678
-
679
- ['/gdc/exporter/result/{id}/{id}', %r{/gdc/exporter/result/[\w]+/[\w]+}],
680
-
681
- ['/gdc/internal/lcm/domains/{id}/dataproducts/{data_product}/segments/{segment}/syncProcesses/{process}',
682
- %r{/gdc/internal/lcm/domains/[\w-]+/dataproducts/[\w-]+/segments/[\w-]+/syncProcesses/[\w]+}],
683
- ['/gdc/internal/lcm/domains/{id}/dataproducts/{data_product}/segments/{segment}/syncProcesses',
684
- %r{/gdc/internal/lcm/domains/[\w-]+/dataproducts/[\w-]+/segments/[\w-]+/syncProcesses}],
685
-
686
- ['/gdc/internal/projects/{id}/objects/setPermissions', %r{/gdc/internal/projects/[\w]+/objects/setPermissions}],
687
-
688
- ['/gdc/md/{id}/variables/item/{id}', %r{/gdc/md/[\w]+/variables/item/[\d]+}],
689
- ['/gdc/md/{id}/validate/task/{id}', %r{/gdc/md/[\w]+/validate/task/[\w]+}],
690
- ['/gdc/md/{id}/using2/{id}/{id}', %r{/gdc/md/[\w]+/using2/[\d]+/[\d]+}],
691
- ['/gdc/md/{id}/using2/{id}', %r{/gdc/md/[\w]+/using2/[\d]+}],
692
- ['/gdc/md/{id}/userfilters?users={users}', %r{/gdc/md/[\w]+/userfilters\?users=[/\w]+}],
693
- ['/gdc/md/{id}/userfilters?count={count}&offset={offset}', %r{/gdc/md/[\w]+/userfilters\?count=[\d]+&offset=[\d]+}],
694
- ['/gdc/md/{id}/usedby2/{id}/{id}', %r{/gdc/md/[\w]+/usedby2/[\d]+/[\d]+}],
695
- ['/gdc/md/{id}/usedby2/{id}', %r{/gdc/md/[\w]+/usedby2/[\d]+}],
696
- ['/gdc/md/{id}/tasks/{id}/status', %r{/gdc/md/[\w]+/tasks/[\w]+/status}],
697
- ['/gdc/md/{id}/obj/{id}/validElements', %r{/gdc/md/[\w]+/obj/[\d]+/validElements(/)?(\?.*)?}],
698
- ['/gdc/md/{id}/obj/{id}/elements', %r{/gdc/md/[\w]+/obj/[\d]+/elements(/)?(\?.*)?}],
699
- ['/gdc/md/{id}/obj/{id}', %r{/gdc/md/[\w]+/obj/[\d]+}],
700
- ['/gdc/md/{id}/etltask/{id}', %r{/gdc/md/[\w]+/etltask/[\w]+}],
701
- ['/gdc/md/{id}/dataResult/{id}', %r{/gdc/md/[\w]+/dataResult/[\d]+}],
702
- ['/gdc/md/{id}', %r{/gdc/md/[\w]+}],
703
-
704
- ['/gdc/projects/{id}/users/{id}/roles', %r{/gdc/projects/[\w]+/users/[\w]+/roles}],
705
- ['/gdc/projects/{id}/users/{id}/permissions', %r{/gdc/projects/[\w]+/users/[\w]+/permissions}],
706
- ['/gdc/projects/{id}/users', %r{/gdc/projects/[\w]+/users}],
707
- ['/gdc/projects/{id}/schedules/{id}/executions/{id}', %r{/gdc/projects/[\w]+/schedules/[\w]+/executions/[\w]+}],
708
- ['/gdc/projects/{id}/schedules/{id}', %r{/gdc/projects/[\w]+/schedules/[\w]+}],
709
- ['/gdc/projects/{id}/roles/{id}', %r{/gdc/projects/[\w]+/roles/[\d]+}],
710
- ['/gdc/projects/{id}/model/view/{id}', %r{/gdc/projects/[\w]+/model/view/[\w]+}],
711
- ['/gdc/projects/{id}/model/view', %r{/gdc/projects/[\w]+/model/view}],
712
- ['/gdc/projects/{id}/model/diff/{id}', %r{/gdc/projects/[\w]+/model/diff/[\w]+}],
713
- ['/gdc/projects/{id}/model/diff', %r{/gdc/projects/[\w]+/model/diff}],
714
- ['/gdc/projects/{id}/dataload/processes/{id}/executions/{id}', %r{/gdc/projects/[\w]+/dataload/processes/[\w-]+/executions/[\w-]+}],
715
- ['/gdc/projects/{id}/dataload/processes/{id}', %r{/gdc/projects/[\w]+/dataload/processes/[\w-]+}],
716
- ['/gdc/projects/{id}/', %r{/gdc/projects/[\w]+/}],
717
- ['/gdc/projects/{id}', %r{/gdc/projects/[\w]+}]
718
- ]
719
-
720
652
  def update_stats(title, delta)
721
653
  synchronize do
722
654
  orig_title = title
File without changes
@@ -0,0 +1,81 @@
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
+ module GoodData
8
+ module Rest
9
+ class Connection
10
+ # PH_MAP for wildcarding of URLs in reports
11
+ PH_MAP = [
12
+ ['/gdc/account/profile/{id}', %r{/gdc/account/profile/[\w]+}],
13
+ ['/gdc/account/login/{id}', %r{/gdc/account/login/[\w]+}],
14
+ ['/gdc/account/domains/{id}/users?login={login}', %r{/gdc/account/domains/[\w\d-]+/users\?login=[^&$]+}],
15
+ ['/gdc/account/domains/{id}', %r{/gdc/account/domains/[\w\d-]+}],
16
+
17
+ ['/gdc/projects/{id}/execute', %r{/gdc/projects/[\w]+/execute}],
18
+
19
+ ['/gdc/datawarehouse/instances/{id}', %r{/gdc/datawarehouse/instances/[\w]+}],
20
+ ['/gdc/datawarehouse/executions/{id}', %r{/gdc/datawarehouse/executions/[\w]+}],
21
+
22
+ ['/gdc/domains/{id}/segments/{segment}/synchronizeClients/results/{result}/details?offset={offset}&limit={limit}',
23
+ %r{/gdc/domains/[\w-]+/segments/[\w-]+/synchronizeClients/results/[\w]+/details/\?offset=[\d]+&limit=[\d]+}],
24
+ ['/gdc/domains/{id}/segments/{segment}/synchronizeClients/results/{result}',
25
+ %r{/gdc/domains/[\w-]+/segments/[\w-]+/synchronizeClients/results/[\w]+}],
26
+ ['/gdc/domains/{id}/segments/{segment}/', %r{/gdc/domains/[\w-]+/segments/[\w-]+/}],
27
+ ['/gdc/domains/{id}/segments/{segment}', %r{/gdc/domains/[\w-]+/segments/[\w-]+}],
28
+ ['/gdc/domains/{id}/clients?segment={segment}', %r{/gdc/domains/[\w-]+/clients\?segment=[\w-]+}],
29
+ ['/gdc/domains/{id}/clients/{client_id}/settings/lcm.title', %r{/gdc/domains/[\w-]+/clients/[\w-]+/settings/lcm.title}],
30
+ ['/gdc/domains/{id}/clients/{client_id}/settings/lcm.token', %r{/gdc/domains/[\w-]+/clients/[\w-]+/settings/lcm.token}],
31
+ ['/gdc/domains/{id}/clients/{client_id}', %r{/gdc/domains/[\w-]+/clients/[\w-]+}],
32
+ ['/gdc/domains/{id}/provisionClientProjects/results/{result}/details?offset={offset}&limit={limit}',
33
+ %r{/gdc/domains/[\w-]+/provisionClientProjects/results/[\w]+/details/\?offset=[\d]+&limit=[\d]+}],
34
+ ['/gdc/domains/{id}/provisionClientProjects/results/{result}', %r{/gdc/domains/[\w-]+/provisionClientProjects/results/[\w]+}],
35
+ ['/gdc/domains/{id}/provisionClientProjects', %r{/gdc/domains/[\w-]+/provisionClientProjects}],
36
+ ['/gdc/domains/{id}/updateClients', %r{/gdc/domains/[\w-]+/updateClients}],
37
+ ['/gdc/domains/{id}/', %r{/gdc/domains/[\w-]+/}],
38
+
39
+ ['/gdc/exporter/result/{id}/{id}', %r{/gdc/exporter/result/[\w]+/[\w]+}],
40
+
41
+ ['/gdc/internal/lcm/domains/{id}/dataproducts/{data_product}/segments/{segment}/syncProcesses/{process}',
42
+ %r{/gdc/internal/lcm/domains/[\w-]+/dataproducts/[\w-]+/segments/[\w-]+/syncProcesses/[\w]+}],
43
+ ['/gdc/internal/lcm/domains/{id}/dataproducts/{data_product}/segments/{segment}/syncProcesses',
44
+ %r{/gdc/internal/lcm/domains/[\w-]+/dataproducts/[\w-]+/segments/[\w-]+/syncProcesses}],
45
+
46
+ ['/gdc/internal/projects/{id}/objects/setPermissions', %r{/gdc/internal/projects/[\w]+/objects/setPermissions}],
47
+
48
+ ['/gdc/md/{id}/variables/item/{id}', %r{/gdc/md/[\w]+/variables/item/[\d]+}],
49
+ ['/gdc/md/{id}/validate/task/{id}', %r{/gdc/md/[\w]+/validate/task/[\w]+}],
50
+ ['/gdc/md/{id}/using2/{id}/{id}', %r{/gdc/md/[\w]+/using2/[\d]+/[\d]+}],
51
+ ['/gdc/md/{id}/using2/{id}', %r{/gdc/md/[\w]+/using2/[\d]+}],
52
+ ['/gdc/md/{id}/userfilters?users={users}', %r{/gdc/md/[\w]+/userfilters\?users=[/\w]+}],
53
+ ['/gdc/md/{id}/userfilters?count={count}&offset={offset}', %r{/gdc/md/[\w]+/userfilters\?count=[\d]+&offset=[\d]+}],
54
+ ['/gdc/md/{id}/usedby2/{id}/{id}', %r{/gdc/md/[\w]+/usedby2/[\d]+/[\d]+}],
55
+ ['/gdc/md/{id}/usedby2/{id}', %r{/gdc/md/[\w]+/usedby2/[\d]+}],
56
+ ['/gdc/md/{id}/tasks/{id}/status', %r{/gdc/md/[\w]+/tasks/[\w]+/status}],
57
+ ['/gdc/md/{id}/obj/{id}/validElements', %r{/gdc/md/[\w]+/obj/[\d]+/validElements(/)?(\?.*)?}],
58
+ ['/gdc/md/{id}/obj/{id}/elements', %r{/gdc/md/[\w]+/obj/[\d]+/elements(/)?(\?.*)?}],
59
+ ['/gdc/md/{id}/obj/{id}', %r{/gdc/md/[\w]+/obj/[\d]+}],
60
+ ['/gdc/md/{id}/etltask/{id}', %r{/gdc/md/[\w]+/etltask/[\w]+}],
61
+ ['/gdc/md/{id}/dataResult/{id}', %r{/gdc/md/[\w]+/dataResult/[\d]+}],
62
+ ['/gdc/md/{id}', %r{/gdc/md/[\w]+}],
63
+
64
+ ['/gdc/projects/{id}/users/{id}/roles', %r{/gdc/projects/[\w]+/users/[\w]+/roles}],
65
+ ['/gdc/projects/{id}/users/{id}/permissions', %r{/gdc/projects/[\w]+/users/[\w]+/permissions}],
66
+ ['/gdc/projects/{id}/users', %r{/gdc/projects/[\w]+/users}],
67
+ ['/gdc/projects/{id}/schedules/{id}/executions/{id}', %r{/gdc/projects/[\w]+/schedules/[\w]+/executions/[\w]+}],
68
+ ['/gdc/projects/{id}/schedules/{id}', %r{/gdc/projects/[\w]+/schedules/[\w]+}],
69
+ ['/gdc/projects/{id}/roles/{id}', %r{/gdc/projects/[\w]+/roles/[\d]+}],
70
+ ['/gdc/projects/{id}/model/view/{id}', %r{/gdc/projects/[\w]+/model/view/[\w]+}],
71
+ ['/gdc/projects/{id}/model/view', %r{/gdc/projects/[\w]+/model/view}],
72
+ ['/gdc/projects/{id}/model/diff/{id}', %r{/gdc/projects/[\w]+/model/diff/[\w]+}],
73
+ ['/gdc/projects/{id}/model/diff', %r{/gdc/projects/[\w]+/model/diff}],
74
+ ['/gdc/projects/{id}/dataload/processes/{id}/executions/{id}', %r{/gdc/projects/[\w]+/dataload/processes/[\w-]+/executions/[\w-]+}],
75
+ ['/gdc/projects/{id}/dataload/processes/{id}', %r{/gdc/projects/[\w]+/dataload/processes/[\w-]+}],
76
+ ['/gdc/projects/{id}/', %r{/gdc/projects/[\w]+/}],
77
+ ['/gdc/projects/{id}', %r{/gdc/projects/[\w]+}]
78
+ ]
79
+ end
80
+ end
81
+ end
File without changes
File without changes
@@ -6,7 +6,7 @@
6
6
 
7
7
  # GoodData Module
8
8
  module GoodData
9
- VERSION = '1.0.0'
9
+ VERSION = '1.0.1'
10
10
 
11
11
  class << self
12
12
  # Version
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,252 @@
1
+ {
2
+ "datasets": [
3
+ {
4
+ "type": "dataset",
5
+ "title": "Policies",
6
+ "id": "dataset.csv_policies",
7
+ "columns": [
8
+ {
9
+ "type": "anchor",
10
+ "id": "attr.csv_policies.factsof",
11
+ "title": "Records of Policies",
12
+ "description": null,
13
+ "folder": null
14
+ },
15
+ {
16
+ "type": "attribute",
17
+ "id": "attr.csv_policies.customer",
18
+ "title": "Customer",
19
+ "description": null,
20
+ "folder": "Policies"
21
+ },
22
+ {
23
+ "type": "label",
24
+ "id": "label.csv_policies.customer",
25
+ "reference": "attr.csv_policies.customer",
26
+ "title": "Customer",
27
+ "gd_data_type": "VARCHAR(255)",
28
+ "gd_type": "GDC.text",
29
+ "default_label": true
30
+ },
31
+ {
32
+ "type": "attribute",
33
+ "id": "attr.csv_policies.state",
34
+ "title": "State",
35
+ "description": null,
36
+ "folder": "Policies"
37
+ },
38
+ {
39
+ "type": "label",
40
+ "id": "label.csv_policies.state",
41
+ "reference": "attr.csv_policies.state",
42
+ "title": "State",
43
+ "gd_data_type": "VARCHAR(255)",
44
+ "gd_type": "GDC.text",
45
+ "default_label": true
46
+ },
47
+ {
48
+ "type": "attribute",
49
+ "id": "attr.csv_policies.coverage",
50
+ "title": "Coverage",
51
+ "description": null,
52
+ "folder": "Policies"
53
+ },
54
+ {
55
+ "type": "label",
56
+ "id": "label.csv_policies.coverage",
57
+ "reference": "attr.csv_policies.coverage",
58
+ "title": "Coverage",
59
+ "gd_data_type": "VARCHAR(255)",
60
+ "gd_type": "GDC.text",
61
+ "default_label": true
62
+ },
63
+ {
64
+ "type": "attribute",
65
+ "id": "attr.csv_policies.education",
66
+ "title": "Education",
67
+ "description": null,
68
+ "folder": "Policies"
69
+ },
70
+ {
71
+ "type": "label",
72
+ "id": "label.csv_policies.education",
73
+ "reference": "attr.csv_policies.education",
74
+ "title": "Education",
75
+ "gd_data_type": "VARCHAR(255)",
76
+ "gd_type": "GDC.text",
77
+ "default_label": true
78
+ },
79
+ {
80
+ "type": "attribute",
81
+ "id": "attr.csv_policies.employmentstatus",
82
+ "title": "Employmentstatus",
83
+ "description": null,
84
+ "folder": "Policies"
85
+ },
86
+ {
87
+ "type": "label",
88
+ "id": "label.csv_policies.employmentstatus",
89
+ "reference": "attr.csv_policies.employmentstatus",
90
+ "title": "Employmentstatus",
91
+ "gd_data_type": "VARCHAR(255)",
92
+ "gd_type": "GDC.text",
93
+ "default_label": true
94
+ },
95
+ {
96
+ "type": "attribute",
97
+ "id": "attr.csv_policies.gender",
98
+ "title": "Gender",
99
+ "description": null,
100
+ "folder": "Policies"
101
+ },
102
+ {
103
+ "type": "label",
104
+ "id": "label.csv_policies.gender",
105
+ "reference": "attr.csv_policies.gender",
106
+ "title": "Gender",
107
+ "gd_data_type": "VARCHAR(255)",
108
+ "gd_type": "GDC.text",
109
+ "default_label": true
110
+ },
111
+ {
112
+ "type": "attribute",
113
+ "id": "attr.csv_policies.marital_status",
114
+ "title": "Marital Status",
115
+ "description": null,
116
+ "folder": "Policies"
117
+ },
118
+ {
119
+ "type": "label",
120
+ "id": "label.csv_policies.marital_status",
121
+ "reference": "attr.csv_policies.marital_status",
122
+ "title": "Marital Status",
123
+ "gd_data_type": "VARCHAR(255)",
124
+ "gd_type": "GDC.text",
125
+ "default_label": true
126
+ },
127
+ {
128
+ "type": "attribute",
129
+ "id": "attr.csv_policies.policy_type",
130
+ "title": "Policy Type",
131
+ "description": null,
132
+ "folder": "Policies"
133
+ },
134
+ {
135
+ "type": "label",
136
+ "id": "label.csv_policies.policy_type",
137
+ "reference": "attr.csv_policies.policy_type",
138
+ "title": "Policy Type",
139
+ "gd_data_type": "VARCHAR(255)",
140
+ "gd_type": "GDC.text",
141
+ "default_label": true
142
+ },
143
+ {
144
+ "type": "attribute",
145
+ "id": "attr.csv_policies.renew_offer_type",
146
+ "title": "Renew Offer Type",
147
+ "description": null,
148
+ "folder": "Policies"
149
+ },
150
+ {
151
+ "type": "label",
152
+ "id": "label.csv_policies.renew_offer_type",
153
+ "reference": "attr.csv_policies.renew_offer_type",
154
+ "title": "Renew Offer Type",
155
+ "gd_data_type": "VARCHAR(255)",
156
+ "gd_type": "GDC.text",
157
+ "default_label": true
158
+ },
159
+ {
160
+ "type": "attribute",
161
+ "id": "attr.csv_policies.sales_channel",
162
+ "title": "Sales Channel",
163
+ "description": null,
164
+ "folder": "Policies"
165
+ },
166
+ {
167
+ "type": "label",
168
+ "id": "label.csv_policies.sales_channel",
169
+ "reference": "attr.csv_policies.sales_channel",
170
+ "title": "Sales Channel",
171
+ "gd_data_type": "VARCHAR(255)",
172
+ "gd_type": "GDC.text",
173
+ "default_label": true
174
+ },
175
+ {
176
+ "type": "attribute",
177
+ "id": "attr.csv_policies.vehicle_class",
178
+ "title": "Vehicle Class",
179
+ "description": null,
180
+ "folder": "Policies"
181
+ },
182
+ {
183
+ "type": "label",
184
+ "id": "label.csv_policies.vehicle_class",
185
+ "reference": "attr.csv_policies.vehicle_class",
186
+ "title": "Vehicle Class",
187
+ "gd_data_type": "VARCHAR(255)",
188
+ "gd_type": "GDC.text",
189
+ "default_label": true
190
+ },
191
+ {
192
+ "type": "attribute",
193
+ "id": "attr.csv_policies.vehicle_size",
194
+ "title": "Vehicle Size",
195
+ "description": null,
196
+ "folder": "Policies"
197
+ },
198
+ {
199
+ "type": "label",
200
+ "id": "label.csv_policies.vehicle_size",
201
+ "reference": "attr.csv_policies.vehicle_size",
202
+ "title": "Vehicle Size",
203
+ "gd_data_type": "VARCHAR(255)",
204
+ "gd_type": "GDC.text",
205
+ "default_label": true
206
+ },
207
+ {
208
+ "type": "fact",
209
+ "id": "fact.csv_policies.customer_lifetime_value",
210
+ "title": "Customer Lifetime Value",
211
+ "folder": "Policies",
212
+ "gd_data_type": "DECIMAL(15,6)",
213
+ "restricted": true
214
+ },
215
+ {
216
+ "type": "fact",
217
+ "id": "fact.csv_policies.income",
218
+ "title": "Income",
219
+ "folder": "Policies",
220
+ "gd_data_type": "DECIMAL(15,6)",
221
+ "restricted": true
222
+ },
223
+ {
224
+ "type": "fact",
225
+ "id": "fact.csv_policies.monthly_premium_auto",
226
+ "title": "Monthly Premium Auto",
227
+ "folder": "Policies",
228
+ "gd_data_type": "DECIMAL(15,6)"
229
+ },
230
+ {
231
+ "type": "fact",
232
+ "id": "fact.csv_policies.total_claim_amount",
233
+ "title": "Total Claim Amount",
234
+ "folder": "Policies",
235
+ "gd_data_type": "DECIMAL(15,6)"
236
+ },
237
+ {
238
+ "type": "date",
239
+ "dataset": "effective_to_date"
240
+ }
241
+ ]
242
+ }
243
+ ],
244
+ "date_dimensions": [
245
+ {
246
+ "type": "date_dimension",
247
+ "id": "effective_to_date",
248
+ "title": "Effective To Date"
249
+ }
250
+ ],
251
+ "title": "QA Infra"
252
+ }