I need some guidance on what nodes to use to read a file. I will be using Java code to read a file in native format. This format is .pp which is an Asta Powerproject file. The java code will be written with the help of the following resource: https://www.mpxj.org/
I’ve not written the code yet.
There is a possibility of using Python code instead. The output with will be an excel/csv file that will be shipped to Power BI.
Hi @lahiru_ten , do you have details, or at least an idea of what you expect the format of the output to be?
Does the data that you’ll collect from the pp file lend itself to being output as a series of data tables?
I’m assuming it does…
Whilst I generally favour using java because of my own background, if you are thinking of building something within KNIME nodes for this, I’d probably suggest python would be the better option here.
That’s because Java Snippet works at the row level and cannot in itself generate a new table from scratch. There are ways to achieve it, involving building arrays or delimited strings, but it can get messy. Ultimately for Java snippet, it’s table output really relies on having a similar table as input.
In contrast, the Python Script node is fully capable of generating multiple output tables in their entirety and is not dependant on having any particular input table to work with. It would therefore be totally feasible (assuming it makes sense with the Powerproject data files, and also making assumptions about the capabilities of the mpxj resource you mention, with respect to Python), to read a single data file using the library you describe, and have it generate one or more output tables of data.
After that you can process the returned table data with whatever nodes you require, such as Excel Writer.
Are you able to upload a sample/demo pp file (you would probably need to rename the extension, or better still, zip it, so the forum will allow it to be uploaded). I’m not saying I can help, but it may be useful to look at to bounce ideas around.
The format of the out put would be a structured table that contains information such as Task name, start date, end date, baseline information etc. I’ve attached a sample excel spreadsheet that has come straight from ASTA via an export BI feature. As I want some form of automation, I’d like this to be done by KNIME.