I need to access a Text Area Calculated Value from python WITHOUT first using JS or R-script (we're not using a stats server) to transfer the value to a Document Property. Is this possible?
Before I begin:
I would ask that any respondent that feels this question is incomplete, improperly formatted, or improperly tagged please let me know so I can attempt to remedy these matters. I am working on a somewhat sensitive project, so some of what I have posted here is intentionally vague. Requests for further information in an attempt to clarify the issue will be met with the most complete information I can provide given the NDA I have signed with the client.
Now, to define the issue:
I am using calculated values to determine the difference between marked and filtered values in a datatable. The purpose is efficiency of the resulting parameters passed to an information link. We're using upwards of a million rows, and passing unique values per marked row is not an option with this volume of data. I have devised a python script that can compare marked versus filtered values based on the horizontal and vertical axes of a cross table. The values in question are produced by text area Calculated Values. The expressions are something like:
Substitute(Substitute(UniqueConcatenate(
Substitute(
Concatenate([HierarchyCol1],"|",[HierarchyCol2],"|",[HierarchyCol3],"|",[HierarchyCol4],"|",[HierarchyCol5],"_-", [HorixontalAxisCol],
"_+",
Count(RowId()) OVER (Intersect([HierarchyCol1],[HierarchyCol2],[HierarchyCol3],[HierarchyCol4],[HierarchyCol5]))),",","^")),
", ",",+"),"^",",")
This particular expression is from the 5th level of the hierarchy being examined. There would be 2 calculated values sharing this expression. One being data-limited by filtering from page and the other being limited by the marking used in the visualization in question. This allows me to pass parameters that result in a where condition like:
WHERE
[filteredColumn] in (...)
and
(
(
[HierarchyCol1] in (...)
AND
[HorixontalAxisCol] in (...)
)
or
(
[HierarchyCol2] in (...)
AND
[HorixontalAxisCol] in (...)
)
(
[HierarchyCol3] in (...)
AND
[HorixontalAxisCol] in (...)
)
(
[HierarchyCol4] in (...)
AND
[HorixontalAxisCol] in (...)
)
(
[HierarchyCol5] in (...)
AND
[HorixontalAxisCol] in (...)
)
)
Using JS like:
var oldValue5=0
transferValue = function(){
//get value from calcVal spotfire Calculated Value Dyn Item
value5=$("#HierarchyCol5CV").text().trim()
//update input when oldValue changes
if(value5!=oldValue5){
$("#HierarchyCol5DP input").val(value1).blur();
}
oldValue5=value5
}
setInterval(transferValue,1000) //1 time per second
where an input field has the id "HierarchyCol5DP input" and the Calculated value has the id "HierarchyCol5CV" to get the Calculated Value into a Document Property is actually functional on smaller volume datasets, but the text gets too big larger datasets, specifically on datasets with higher cardinality on the hierarchy and horizontal axis. The JS actually freezes Spotfire into a state where it is entirely unresponsive.
So, the Real Question:
How can I call the .Value of a Text Area Calculated Value in python? We're not using a stats server so R isn't an option, and the overhead on the JS makes it essentially unusable. -OR- Is there a more efficient way to accomplish the desired SQL where clause?