|
1 | 1 | constant: CONNECTION_NAME {
|
2 |
| - value: "qa-thjennifer3" |
| 2 | + value: "cortex" |
3 | 3 | export: override_required
|
4 | 4 | }
|
5 | 5 |
|
6 | 6 | constant: GCP_PROJECT {
|
7 |
| - value: "thjennifer3" |
| 7 | + value: "GCP Project Name" |
8 | 8 | export: override_required
|
9 | 9 | }
|
10 | 10 |
|
11 | 11 | constant: REPORTING_DATASET {
|
12 |
| - value: "CORTEX_SAP_REPORTING" |
| 12 | + value: "Reporting Dataset Name" |
13 | 13 | export: override_required
|
14 | 14 | }
|
15 | 15 |
|
16 | 16 | constant: CLIENT {
|
17 |
| - value: "100" |
| 17 | + value: "Client ID" |
18 | 18 | export: override_required
|
19 | 19 | }
|
20 | 20 |
|
@@ -43,39 +43,40 @@ constant: max_fiscal_period {
|
43 | 43 |
|
44 | 44 | # comparison period derived based on select_comparison_type parameter:
|
45 | 45 | # if yoy then subtract year from period
|
46 |
| -# if prior then subtract 1 from period (if period 001 then substract 1 year and use max_fiscal_period for period) |
| 46 | +# if prior then subtract 1 from period (if period = 01 or 001 then substract 1 year and use max_fiscal_period for period) |
47 | 47 | # if custom then use value from select_custom_comparison_period
|
| 48 | +# if none use '' |
48 | 49 | constant: derive_comparison_period {
|
49 | 50 | value: "{% assign comparison_type = select_comparison_type._parameter_value %}
|
50 |
| - {% assign fp = select_fiscal_period._parameter_value %} |
51 |
| - {% assign cp = select_custom_comparison_period._parameter_value %} |
52 |
| - {% assign max_fp_size = '@{max_fiscal_period}' | remove_first: '0' | size | times: 1 %} |
53 |
| - {% assign max_fp_size_neg = max_fp_size | times: -1 %} |
54 |
| - {% assign pad = '' %} |
55 |
| - {% for i in (1..max_fp_size) %} |
56 |
| - {% assign pad = pad | append: '0' %} |
57 |
| - {% endfor %} |
58 |
| - {% if comparison_type == 'custom' %} |
59 |
| - {% if fp == cp %}{% assign comparison_type = 'none' %} |
60 |
| - {% elsif cp == '' %}{% assign comparison_type = 'yoy' %} |
61 |
| - {% endif %} |
62 |
| - {% endif %} |
| 51 | + {% assign fp = select_fiscal_period._parameter_value %} |
| 52 | + {% assign cp = select_custom_comparison_period._parameter_value %} |
| 53 | + {% assign max_fp_size = '@{max_fiscal_period}' | remove_first: '0' | size | times: 1 %} |
| 54 | + {% assign max_fp_size_neg = max_fp_size | times: -1 %} |
| 55 | + {% assign pad = '' %} |
| 56 | + {% for i in (1..max_fp_size) %} |
| 57 | + {% assign pad = pad | append: '0' %} |
| 58 | + {% endfor %} |
| 59 | + {% if comparison_type == 'custom' %} |
| 60 | + {% if fp == cp %}{% assign comparison_type = 'none' %} |
| 61 | + {% elsif cp == '' %}{% assign comparison_type = 'yoy' %} |
| 62 | + {% endif %} |
| 63 | + {% endif %} |
63 | 64 |
|
64 |
| - {% if comparison_type == 'prior' or comparison_type == 'yoy' %} |
65 |
| - {% assign p_array = fp | split: '.' %} |
66 |
| - {% if comparison_type == 'prior' %} |
67 |
| - {% if p_array[1] == '001' or p_array[1] == '01' %} |
68 |
| - {% assign m = '@{max_fiscal_period}' %}{% assign sub_yr = 1 %} |
69 |
| - {% else %} |
70 |
| - {% assign m = p_array[1] | times: 1 | minus: 1 | prepend: pad | slice: max_fp_size_neg, max_fp_size %}{% assign sub_yr = 0 %} |
71 |
| - {% endif %} |
72 |
| - {% else %} |
73 |
| - {% assign m = p_array[1] %}{% assign sub_yr = 1 %} |
74 |
| - {% endif %} |
75 |
| - {% assign yr = p_array[0] | times: 1 | minus: sub_yr %} |
76 |
| - {% assign cp = yr | append: '.'| append: m %} |
77 |
| - {% elsif comparison_type == 'none' %} {% assign cp = '' %} |
78 |
| - {% endif %}" |
| 65 | + {% if comparison_type == 'prior' or comparison_type == 'yoy' %} |
| 66 | + {% assign p_array = fp | split: '.' %} |
| 67 | + {% if comparison_type == 'prior' %} |
| 68 | + {% if p_array[1] == '001' or p_array[1] == '01' %} |
| 69 | + {% assign m = '@{max_fiscal_period}' %}{% assign sub_yr = 1 %} |
| 70 | + {% else %} |
| 71 | + {% assign m = p_array[1] | times: 1 | minus: 1 | prepend: pad | slice: max_fp_size_neg, max_fp_size %}{% assign sub_yr = 0 %} |
| 72 | + {% endif %} |
| 73 | + {% else %} |
| 74 | + {% assign m = p_array[1] %}{% assign sub_yr = 1 %} |
| 75 | + {% endif %} |
| 76 | + {% assign yr = p_array[0] | times: 1 | minus: sub_yr %} |
| 77 | + {% assign cp = yr | append: '.'| append: m %} |
| 78 | + {% elsif comparison_type == 'none' %} {% assign cp = '' %} |
| 79 | + {% endif %}" |
79 | 80 | }
|
80 | 81 |
|
81 | 82 | #} end additional constants
|
0 commit comments