Create single table in Archi

Started by faruki, July 27, 2020, 12:30:48 PM

Previous topic - Next topic

faruki

Hi,

I want to show all the enterprise applications in a single table for audit query. Is it possible to do it in Archi?

Regards,

Phil Beauvoir

Hi, not really as you can't create tables in Archi. Perhaps you can extract and present the data by some other means.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

Hi,

You can do it through a jArchi script.

You can also run a sql query on the query tab included in the default HTML report: right click on your model, select Preview HTML report, then (when the report appears in Archi) select the Query tab and, at the "alasql>" prompt, enter:
SELECT name FROM Elements WHERE type = 'ApplicationComponent'

You can export the result of any query in CSV by adding an INTO clause:
SELECT name INTO CSV('export.csv') FROM Elements WHERE type = 'ApplicationComponent'

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

faruki

Thanks for the feedback. I'll try it.

bigyin

Would be grateful for help with a more complicated use case (lack of my SQL etc ..) to get the CSV

Elements (services) linked to requirements and plateau (current, state, target state) and to Status (Deployed, etc).

is it possible to output a table of all linked to a defined plateau e.g all services, and the requirements that are related with  specific relationship types (e.g. serving, flows to etc)

View is made, trying to get output from view to csv for follow tracing etc by non architects

projetnumero9


Without using jArchi, that is a bit tricky, AFAIAC.
What I came up with, as a first step, is:


WITH RelationshipsMatrix AS (SELECT * FROM Relationships),
IdNameMatrix1 AS (SELECT name, id FROM Elements),
IdNameMatrix2 AS (SELECT name, id FROM Elements),
PropertiesSubset1 AS (SELECT * FROM Properties WHERE propkey = "status" and propvalue= "deployed"),
PropertiesSubset2 AS (SELECT * FROM Properties WHERE propkey = "status" and propvalue= "deployed")
SELECT RelationshipsMatrix.type AS RelationType, RelationshipsMatrix.name AS RelationName, IdNameMatrix1.name AS SourceName, PropertiesSubset1.propvalue AS SourceStatus, IdNameMatrix2.name AS TargetName, PropertiesSubset2.propvalue AS TargetStatus
INTO CSV("test.csv",{headers:true})
FROM IdNameMatrix1 INNER JOIN RelationshipsMatrix ON RelationshipsMatrix.sourceid = IdNameMatrix1.id
INNER JOIN IdNameMatrix2 ON RelationshipsMatrix.targetid = IdNameMatrix2.id
INNER JOIN PropertiesSubset1 ON PropertiesSubset1.conceptid = IdNameMatrix1.id
INNER JOIN PropertiesSubset2 ON PropertiesSubset2.conceptid = IdNameMatrix2.id


It outputs in a .CSV file, named test.csv, the following:
- RelationType
- RelationName
- SourceName
- SourceStatus
- TargetName
- TargetStatus
, the WHERE clause being
- source and target concepts have to have a property, named "status", and set to "deployed"

That reports on the whole model.
To report only on a view, tables Views and ViewsContent could be used but I, for the time being, did not find out how to relate "ViewsContent.contentid" with "Elements.id", which would then permit to filter my IdNameMatrix* in my example query with something like:


Select * FROM Elements INNER JOIN ViewsContent on Elements.id = ViewsContent.contentid
INNER JOIN Views ON ViewsContent.viewid = Views.id
WHERE Views.name = "PlateauName"


AlexL

Actualy it is a big thing to make archi create traceability matrices and other table data representations.

For example if Archi would have a native mechanism to make a table view in model with further export into HTML report - it would be REALY great.