Product:
Planning Analytics 2.0.9.19 or newer
Microsoft Windows 2019 server
Issue:
How call a cmd/bat file without use the Executecommand, that is not around in the next version?
Solution:
In TM1 version 11 you can use ExecuteCommand(CommandLine, Wait); https://www.wimgielis.com/tm1_executetempbatchfile_EN.htm
In future version you have to do something else, probably you need to run some external schedule program that talk REST API to tm1 servers, like TM1Py (cubewise.com) .. and then monitor the TM1 REST API to know when other external program should start.
From a external python script can you send email and start a TM1 TI process (with REST API) , but how do you activate them from inside TM1 TI without use of the ExecuteCommand?
Only option is ExecuteHttpRequest, described below: (but that means that the other application must have a REST API support)
This function executes an HTTP request. It supports HTTP methods GET, POST, PATCH, PUT and DELETE.
The HTTP response is cached in memory. A response consists of a status code, a number of headers and a body, any of which can be queried by using the corresponding TurboIntegrator functions: HttpResponseGetStatusCode, HttpResponseGetHeader, and HttpResponseGetBody.
The Planning Analytics Engine only keeps one HTTP response at a time. A new successful HTTP request execution update and overwrites the cached response.
The Planning Analytics Engine only keeps the first 100 KB of a response body and discards the rest. This prevents running out of evaluation memory for strings.
For convenience, the engine reuses the cookie it found in the previous responses in new requests when the Cookie header is absent.
Syntax
ExecuteHttpRequest(method, URL, option1, option2,
...);
Argument |
Description |
---|---|
method | The method of the HTTP request. Supported methods are |
URL | The URL where you want to execute the request. The URL must use the HTTP or HTTPS protocol. |
option1, option2, … | You can use these options in the request:
|
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=functions-executehttprequest
It may exist in some version of TM1. Unclear in the IBM documentation. Below links about Tm1 Rest Api
- Introduction
You can use the IBM® Cognos® TM1® REST API to perform create, read, update, and delete operations on TM1 data by using standards that are defined by OData Version 4 (http://www.odata.org/documentation/). - Overview
The IBM Cognos TM1 REST API provides an Open Data Protocol (OData) Version 4 compliant interface to an IBM Cognos TM1 server, which allows clients to query and update data sources that are hosted by the IBM Cognos TM1 Server. - Installation and configuration
After you install IBM Cognos TM1 with the procedures that are described in the Planning Analytics Installation and Configuration documentation, you must enable the use of TM1 REST APIs. - Authenticating and managing sessions
To use the TM1 REST API, your client application needs to authenticate to the TM1 Server. - Metadata
The Entity Data Model (EDM) defines the TM1 data model that is based on OData Version 4.0 Part 3: Common Schema Definition Language (CSDL). It defines the TM1 data model in a common way so that OData clients can understand and manipulate the model. - Representing TM1 data
The OData standard provides a uniform, commonly accepted method of interacting with data by using a REST interface. - Data spreading with the TM1 REST API
One of the most powerful and complex features of TM1 is data spreading. - Managing TM1 database assets with Git
You can use Git source control to deploy database assets such as cubes, books, and views. As an administrator of a TM1 database, you can deploy database assets between environments (for example, from development to production) without stopping the database or manually copying and pasting assets. The source specifications of models and their database assets are created and managed with Git commands. You can see the structure of the database assets in Git and use Git commands to add and remove versions of your assets. - The TM1 Admin Server
Learn all about the IBM TM1 Admin Server here. To access the metadata of the TM1 Admin Server, usehttp://<adminserver>:5895/api/v1/$metadata
orhttps://<adminserver>:5898/api/v1/$metadata
.
More Information:
https://www.ykud.com/blog/pa11-executehttprequest/
ExecuteCommand
is going away in v12 (no interaction with OS in containers) so any external interaction (e.g. emails) will need another way to talk to something- TM1RunTI will not work in v12 either (as well as anything else using C API) and would leave a gap in PA orchestration capability, requiring some external tool to connect 2 PA databases. ExecuteHttpRequest would allow using TM1 Rest Api to achieve the same functionality
https://exploringtm1.com/managing-applications-command-line/
Send email/attachments | BIhints
Using PowerShell in IBM Planning Analytics (aramar.co.uk)
Planning Analytics on Cloud – SMTP (send email) process using Powershell script (ibm.com)
How to use the Synchronize Function with RunProcess to Limit the Number of Threads (cubewise.com)
https://code.cubewise.com/blog/mastering-the-tm1-rest-api-with-postman/
https://www.febooti.com/products/automation-workshop/
But does it exist a scheduler that talk REST API? Power Automate can run Python or PowerShell code where you can write REST API (but Power Automate run IronPython version 2.7 or 3.4, that does not work well with latest tm1py).
https://www.visualcron.com/comparelicenses.aspx#tasks
https://succeedium.com/teamone/
https://ironpython.net/blog/2014/12/07/pip-in-ironpython-275.html