Process
Process(name, has_security_access=False, ui_data='CubeAction=1511\x0cDataAction=1503\x0cCubeLogChanges=0\x0c', parameters=None, variables=None, variables_ui_data=None, prolog_procedure='', metadata_procedure='', data_procedure='', epilog_procedure='', datasource_type='None', datasource_ascii_decimal_separator='.', datasource_ascii_delimiter_char=';', datasource_ascii_delimiter_type='Character', datasource_ascii_header_records=1, datasource_ascii_quote_character='', datasource_ascii_thousand_separator=',', datasource_data_source_name_for_client='', datasource_data_source_name_for_server='', datasource_password='', datasource_user_name='', datasource_query='', datasource_uses_unicode=True, datasource_view='', datasource_subset='', datasource_json_root_pointer='', datasource_json_variable_mapping='')
Bases: TM1Object
Abstraction of a TM1 Process.
IMPORTANT. doesn't work with Processes that were generated through the Wizard
Default construcor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
name of the process - mandatory |
required |
has_security_access
|
Optional[bool]
|
|
False
|
ui_data
|
str
|
|
'CubeAction=1511\x0cDataAction=1503\x0cCubeLogChanges=0\x0c'
|
parameters
|
Iterable
|
|
None
|
variables
|
Iterable
|
|
None
|
variables_ui_data
|
Iterable
|
|
None
|
prolog_procedure
|
str
|
|
''
|
metadata_procedure
|
str
|
|
''
|
data_procedure
|
str
|
|
''
|
epilog_procedure
|
str
|
|
''
|
datasource_type
|
str
|
|
'None'
|
datasource_ascii_decimal_separator
|
str
|
|
'.'
|
datasource_ascii_delimiter_char
|
str
|
|
';'
|
datasource_ascii_delimiter_type
|
str
|
|
'Character'
|
datasource_ascii_header_records
|
int
|
|
1
|
datasource_ascii_quote_character
|
str
|
|
''
|
datasource_ascii_thousand_separator
|
str
|
|
','
|
datasource_data_source_name_for_client
|
str
|
|
''
|
datasource_data_source_name_for_server
|
str
|
|
''
|
datasource_password
|
str
|
|
''
|
datasource_user_name
|
str
|
|
''
|
datasource_query
|
str
|
|
''
|
datasource_uses_unicode
|
bool
|
|
True
|
datasource_view
|
str
|
|
''
|
datasource_subset
|
str
|
|
''
|
datasource_json_root_pointer
|
str
|
|
''
|
datasource_json_variable_mapping
|
str
|
|
''
|
Source code in TM1py/Objects/Process.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
AUTO_GENERATED_STATEMENTS = '{}\r\n{}\r\n'.format(BEGIN_GENERATED_STATEMENTS, END_GENERATED_STATEMENTS)
class-attribute
instance-attribute
BEGIN_GENERATED_STATEMENTS = '#****Begin: Generated Statements***'
class-attribute
instance-attribute
END_GENERATED_STATEMENTS = '#****End: Generated Statements****'
class-attribute
instance-attribute
MAX_STATEMENTS = 16380
class-attribute
instance-attribute
MAX_STATEMENTS_POST_11_8_015 = 100000
class-attribute
instance-attribute
all_procedures
property
body
property
body_as_dict
property
data_procedure
property
writable
datasource_ascii_decimal_separator
property
writable
datasource_ascii_delimiter_char
property
writable
datasource_ascii_delimiter_type
property
writable
datasource_ascii_header_records
property
writable
datasource_ascii_quote_character
property
writable
datasource_ascii_thousand_separator
property
writable
datasource_data_source_name_for_client
property
writable
datasource_data_source_name_for_server
property
writable
datasource_json_root_pointer
property
writable
datasource_json_variable_mapping
property
writable
datasource_password
property
writable
datasource_query
property
writable
datasource_subset
property
writable
datasource_type
property
writable
datasource_user_name
property
writable
datasource_uses_unicode
property
writable
datasource_view
property
writable
epilog_procedure
property
writable
has_security_access
property
writable
metadata_procedure
property
writable
name
property
writable
parameters
property
prolog_procedure
property
writable
variables
property
add_generated_string_to_code(code)
staticmethod
Source code in TM1py/Objects/Process.py
add_parameter(name, prompt, value, parameter_type=None)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
|
required |
prompt
|
str
|
|
required |
value
|
Union[str, int, float]
|
|
required |
parameter_type
|
Optional[str]
|
introduced in TM1 11 REST API, therefor optional. if Not given type is derived from value |
None
|
Returns:
| Type | Description |
|---|---|
|
|
Source code in TM1py/Objects/Process.py
add_variable(name, variable_type)
add variable to the process
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
- |
required |
variable_type
|
str
|
'String' or 'Numeric' |
required |
Returns:
| Type | Description |
|---|---|
|
|
Source code in TM1py/Objects/Process.py
drop_parameter_types()
from_dict(process_as_dict)
classmethod
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_as_dict
|
Dict
|
Dictionary, process as dictionary |
required |
Returns:
| Type | Description |
|---|---|
Process
|
an instance of this class |
Source code in TM1py/Objects/Process.py
from_json(process_as_json)
classmethod
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_as_json
|
str
|
response of /Processes('x')?$expand=* |
required |
Returns:
| Type | Description |
|---|---|
Process
|
an instance of this class |