Closed MasonLegere closed 3 years ago
Would this method allow you to compute rolling averages?
I believe any solution to the issue would imply that we could compute rolling averages.
https://github.com/tableau/TabPy/issues/464
does this provide any insight to what you are experiencing? Or do you have any solution to the problem discussed here?
This is a factor of how the table calculation is being computed (the SCRIPT_REAL function). What is happening is you have some dimensions on the view that are partitioning the table calc, and the SCRIPT_X calcs will make a call to the external server for each partition. It's entirely possible to compute the calc so it sends all data in one call, what you need to do is on the calculation (when it's placed in the view) got to 'edit table calculation' then select Specific Dimensions and check the boxes next to each dimension. This will pass the data to Python in a single call as opposed to many smaller calls. Data are passed as lists with a length of as many marks as there are in the view or each partition.
For more details on table calculations check here: https://help.tableau.com/current/pro/desktop/en-us/calculations_tablecalculations.htm#specific-dimensions
For more details on how to use analytics extensions look here: https://www.youtube.com/watch?v=nRtOMTnBz_Y
Environment information:
Describe the issue In the current implementation if a column with N rows is passed into a function (deployed or local script) the function will be called N (asynchronous) times, each passing in a value in the array. This makes it infeasible to preform calculations that hold state. I am sure that this is a design constraint of Tableau so I am ensure about the feasibility.
To Reproduce Here is an simple example where, based upon the last index of a time series we may like to perform a different action.