FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tm1py-samples/Metadata/process_run_code.py at master · cubewise-code/tm1py-samples · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cubewise-code
/
tm1py-samples
Public
Notifications
You must be signed in to change notification settings
Fork
49
Star
67
Code
Issues
2
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
tm1py-samples
/
Metadata
/
process_run_code.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (27 loc) · 1.05 KB
Breadcrumbs
tm1py-samples
/
Metadata
/
process_run_code.py
Copy path
File metadata and controls
31 lines (27 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
Run loose statements of TI
"""
import
configparser
config
=
configparser
.
ConfigParser
()
# storing the credentials in a file is not recommended for purposes other than testing.
# it's better to setup CAM with SSO or use keyring to store credentials in the windows credential manager. Sample:
# Samples/credentials_best_practice.py
config
.
read
(
r'..\config.ini'
)
from
TM1py
.
Services
import
TM1Service
with
TM1Service
(
**
config
[
'tm1srv01'
])
as
tm1
:
# Sample 1
ti_statements
=
[
"DimensionCreate ( 'TM1py' );"
,
"DimensionElementInsert ( 'TM1py' , '' , 'tm1' , 'N');"
,
"DimensionElementInsert ( 'TM1py' , '' , 'is' , 'N');"
,
"DimensionElementInsert ( 'TM1py' , '' , 'awesome' , 'N');"
]
tm1
.
processes
.
execute_ti_code
(
lines_prolog
=
ti_statements
,
lines_epilog
=
[])
# Sample 2
ti_statements
=
[
"SaveDataAll;"
,
"DeleteAllPersistentFeeders;"
,
"SecurityRefresh;"
,
"CubeProcessFeeders('Plan_BudgetPlan');"
]
tm1
.
processes
.
execute_ti_code
(
lines_prolog
=
ti_statements
,
lines_epilog
=
[])
Back
|
FazBrowse Home
|
New Git URL