Skip to content

Commit 3a7dced

Browse files
authored
Merge pull request #79 from dataiku/bug/sc-257000-mixed-mode-interpolation-is-inverted
fix: [sc-257000] [pi-system plugin] Mixed mode interpolation is inverted
2 parents 2480c77 + 252f128 commit 3a7dced

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [Version 1.3.1](https://github.com/dataiku/dss-plugin-pi-server/releases/tag/v1.3.1) - Bugfix release - 2025-05-24
4+
5+
- Fix the mix mode interpolation type in Transpose & Synchronise (the Step value was inverted)
6+
37
## [Version 1.3.0](https://github.com/dataiku/dss-plugin-pi-server/releases/tag/v1.3.0) - Feature and bug release - 2025-05-23
48

59
- Accept timezone in datetime inputs

custom-recipes/pi-system-transpose/recipe.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def get_values_at_timestamp(file_handles, seek_timestamp, step_attributes):
9595
next_timestamps_cache[attribute_index] = attribute_timestamp
9696
next_values_cache[attribute_index] = attribute_value
9797
next_cached_timestamp = next_timestamps_cache[attribute_index]
98-
if step_attributes.get(attribute_path) is True:
98+
if step_attributes.get(attribute_path) is False:
9999
calculated_value = interpolate(
100100
current_timestamps_cache[attribute_index],
101101
current_values_cache[attribute_index],
@@ -225,7 +225,11 @@ def get_column_name_specifications():
225225
is_step_attribute = input_parameters_row.get(step_column_name)
226226
if is_step_attribute == "True" or is_step_attribute is True:
227227
step_attributes[attribute_path] = True
228+
elif is_step_attribute == "False" or is_step_attribute is False:
229+
step_attributes[attribute_path] = False
228230
elif type_of_interpolation == "interpolation":
231+
step_attributes[attribute_path] = False
232+
elif type_of_interpolation == "last_value":
229233
step_attributes[attribute_path] = True
230234

231235
logger.info("Cached all {} attributes".format(file_counter))

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "pi-system",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"meta": {
55
"label": "PI System",
66
"description": "Retrieve data from your OSIsoft PI System servers",

python-lib/osisoft_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class OSIsoftConstants(object):
405405
"Security": "{base_url}/eventframes/{webid}/security",
406406
"SecurityEntries": "{base_url}/eventframes/{webid}/securityentries"
407407
}
408-
PLUGIN_VERSION = "1.3.0"
408+
PLUGIN_VERSION = "1.3.1"
409409
VALUE_COLUMN_SUFFIX = "_val"
410410
WEB_API_PATH = "piwebapi"
411411
WRITE_HEADERS = {'X-Requested-With': 'XmlHttpRequest'}

0 commit comments

Comments
 (0)