--view parameter of represt not working (not filtering the attributes that should not be in the view)
Hi, I am using represt to export a DNG Module to Excel. The only remaining issue is this one. Here is what I found using the debug tool in elmclient. The DNG View URI is found using the text name of the view which is a good start. My command line is the following: represt rm resources -J "https:server" -U myusername-P mypassword! -p "myprojectname" -m "mymodulename" --view "Test1" -C "myCSVfilename"
So, the DNG View name is "Test1". In DNG, in the Module, you can see View "Test1". On the right side of the below screenshot, you can see the attributes selected to be visible in this View.
But in the Excel output file you can find all attributes of this Module, even the one that are not selected for this View. Since we are in a view that does not include these attribute, they should be filtered out and not appear in the Excel output file. Here is one of them as an example the below one...
And indeed, if I add this attribute to the view, it looks like this in DNG:
Is there someone who could look at this, I would appreciate it so much!
Thank you!
AFAICT what you're observing is how the DNG Reportable REST API works. The view filters the rows but doesn't observe the columns. This behaviour isn't mentioned in the documentation, but there is a section "Common information for the response" which implies that the listed attributes/info is common to all responses, i.e. not affected by asking for a view.
So the --view option is working correctly :-)
Ok, just to summarize. A view in DNG does two things:
- it filters the row to show as shown below:
- it records the columns to show for this view and hides the other columns (attributes), as shown below.
So what you are saying is, that the DNG Reportable REST API does only the first item #1 above but not #2. Is this is correct, is there a way to grab the columns to show that are recorded by a view? Or if it will always show ALL columns of a Module?
the DNG Reportable REST API does only the first item https://github.com/IBM/ELM-Python-Client/discussions/1 above but not https://github.com/IBM/ELM-Python-Client/pull/2.
Yes that's correct.
it will always show ALL columns of a Module?
Basically yes.
a way to grab the columns to show that are recorded by a view
In terms of APIs, I don't think so
In Report Builder you could (perhaps) reproduce the view and that can export to spreadsheet formats. Or similar with an RPE report.
Great. Thanks. And a last thing, if the columns names are the same in from one file to the other, to export, is there a parameter I can use with represt to specify the column names that I want the code to export?
is there a parameter I can use with represt to specify the column names
No - although I'm sure it's possible. FYI I don't have any plan to do this.
closing due to inactivity