Public
Snippet $73 authored by isaak yansane-sisk

transform

Edited
transform_snippet.py
data_stream_module = context.data_stream_module
# setup parameters
start = 304363124
end = start + 2014
script_id = 'DataStream_convertLogToDataArray'
parrallelize = 1

_stream_ = data_stream_module['29']

# call script in context of data_stream_module
_stream_.DataStream_transform(
    start = start,
    end = end,
    chunk_size = 1024,
    transform_script_id = script_id,
    data_array_reference = 'nexedi.balancer-apache-access',
    parallelize=1
)

# File "/srv/slapgrid/slappart1/srv/runner/software/9c6e6dcaf5a61f29365e2e809f2b58cd/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__
#    return self._bindAndExec(args, kw, None)
#  File "/srv/slapgrid/slappart1/srv/runner/software/9c6e6dcaf5a61f29365e2e809f2b58cd/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
#    return self._exec(bound_data, args, kw)
#  File "/srv/slapgrid/slappart1/srv/runner/software/9c6e6dcaf5a61f29365e2e809f2b58cd/parts/erp5/product/ERP5Type/patches/PythonScript.py", line 169, in _exec
#    return PythonScript_exec(self, *args)
#  File "/srv/slapgrid/slappart1/srv/runner/software/9c6e6dcaf5a61f29365e2e809f2b58cd/eggs/Products.PythonScripts-2.13.2-py2.7.egg/Products/PythonScripts/PythonScript.py", line 344, in _exec
#    result = f(*args, **kw)
#  File "Script (Python)", line 27, in DataStream_transform
#    total_size =  context.getSize()
#  File "/srv/slapgrid/slappart1/srv/runner/software/9c6e6dcaf5a61f29365e2e809f2b58cd/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 193, in __getattr__
#    return guarded_getattr(self._wrapped, name, default)
# Unauthorized: You are not allowed to access 'getSize' in this context