Hi all,
I have a .CSV file extracted from TI, With that file can I get know from which TI it got extracted. As I have 100's of TI files which is very difficult to go through each of the TI.
Can anyone suggest how to achieve this.
Need to find the TI name with the extract file
- Alan Kirk
- Site Admin
- Posts: 6610
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Need to find the TI name with the extract file
Not posting into the Enhancements forum without reading Martin's post "Enhancements forum guidelines -PLEASE READ BEFORE POSTING HERE" would be a start.
The second would be to use the GetProcessName() TI function and make the returned value part of the export filename.
------------------
Edit: One clarification in the light of the subsequent responses; that method would allow you to identify the source of FUTURE files. If you have a CURRENT file that you don't know the source of then maybe some better documentation of your system would be an idea. Searching through the .pro files using any method will work IF the file name is completely static (unlikely, unless you're OK with the output files being potentially overwritten) OR there is enough of the filename that is static for you to be able to search for that part.
If you change your processes to embed the process name in the export filename, that ceases to be a problem.
-----------------
I've moved this to the correct forum.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Community Contributor
- Posts: 288
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: Need to find the TI name with the extract file
A couple methods come to mind:
1. look at the last modified date/time of the csv file and then search the tm1server.log file to see which TI process finished around that time
2. use the new processes.search_string_in_code function in TM1py 1.9.0 to look for the exact filename string in a TI process. This works better when the filename is standard/static and not dynamically derived.
1. look at the last modified date/time of the csv file and then search the tm1server.log file to see which TI process finished around that time
2. use the new processes.search_string_in_code function in TM1py 1.9.0 to look for the exact filename string in a TI process. This works better when the filename is standard/static and not dynamically derived.
-
- Posts: 139
- Joined: Tue May 21, 2019 3:33 pm
- OLAP Product: TM1
- Version: PA 2.0.x
- Excel Version: 2016
- Location: The Internet
Re: Need to find the TI name with the extract file
3. In Notepad++, Search->Find in Files.ascheevel wrote: ↑Thu Feb 17, 2022 6:55 pm A couple methods come to mind:
1. look at the last modified date/time of the csv file and then search the tm1server.log file to see which TI process finished around that time
2. use the new processes.search_string_in_code function in TM1py 1.9.0 to look for the exact filename string in a TI process. This works better when the filename is standard/static and not dynamically derived.
Find What: File Name
Filters: *.pro*
Directory: TM1 data folder
-
- Posts: 7
- Joined: Wed Jan 09, 2019 7:08 am
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2013
- Location: Pune
Re: Need to find the TI name with the extract file
I am not sure what you are trying to say, you mean I need to search for .pro in data folder with the same name which my output file contains.
Is this right??
- Alan Kirk
- Site Admin
- Posts: 6610
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Need to find the TI name with the extract file
Not quite.
Those suggestions assume that the name of your output file (or some part of the name) is EMBEDDED (hard coded) in your TI process.
This probably isn't all that common; most export files will include something like a dynamically generated time stamp to ensure that they don't overwrite earlier files. In some cases the entire name is dynamically generated, or is looked up from a control cube, in which case you're out of luck in using this method.
But suppose that your file name is something like "GLExportFile202202181356.csv". If you have, say, "GLExportFile" hard coded in the prolog of the exporting process as part of the export file name, then you can search all of the .pro files to see which process contains that string of text. It is LIKELY, not certain but LIKELY, that you are looking at the process which generated the text file.
Of course, you would need to have access to the data directory to be able to do that.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 3123
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Need to find the TI name with the extract file
To know the processes that can create text files, you can use Notepad++ (if you have access to the TM1 data directory).
You can search with regular expressions for:
asciioutput|textoutput
in the *.pro files of that directory, without subdirectories (not needed).
This will give you all instance where either of the 2 exists.
In theory, ExecuteCommand or other even more exotic constructions can also generate files but very likely AsciiOutput and TextOutput will cover (almost) all cases.
After that, it becomes a semi-manual or even completely manual task to identify what is what. With business knowledge, you can skip certain cases. E.g. a file with balance sheet data will not be exported from a process that has "Export sales data" in the name. But it remains a rather manual task.
You can search with regular expressions for:
asciioutput|textoutput
in the *.pro files of that directory, without subdirectories (not needed).
This will give you all instance where either of the 2 exists.
In theory, ExecuteCommand or other even more exotic constructions can also generate files but very likely AsciiOutput and TextOutput will cover (almost) all cases.
After that, it becomes a semi-manual or even completely manual task to identify what is what. With business knowledge, you can skip certain cases. E.g. a file with balance sheet data will not be exported from a process that has "Export sales data" in the name. But it remains a rather manual task.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly