Create single table in Archi

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

Previous topic - Next topic



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


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


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'


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


Thanks for the feedback. I'll try it.


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


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, AS RelationName, AS SourceName, PropertiesSubset1.propvalue AS SourceStatus, AS TargetName, PropertiesSubset2.propvalue AS TargetStatus
INTO CSV("test.csv",{headers:true})
FROM IdNameMatrix1 INNER JOIN RelationshipsMatrix ON RelationshipsMatrix.sourceid =
INNER JOIN IdNameMatrix2 ON RelationshipsMatrix.targetid =
INNER JOIN PropertiesSubset1 ON PropertiesSubset1.conceptid =
INNER JOIN PropertiesSubset2 ON PropertiesSubset2.conceptid =

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 "", which would then permit to filter my IdNameMatrix* in my example query with something like:

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


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.