Author Topic: Connector.SourceColumns,TargetColumns from RTF template not shown on report  (Read 4246 times)

lfgcasey

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Hello,

We're trying to get a fairly simple report that our Database Architects can give to the ETL Engineers for use in a fairly complex data migration effort here. The goal of the report is to show how the columns in an OldTable map to columns in a NewTable, and any explanatory notes to assist the ETL engineers.

So we have the following template for one of the data packages:
Code: [Select]
SOURCE TO TARGET MAPPING DOCUMENT
package >
{Pkg.Name}

diagram >
{Diagram.DiagramImg}
element >
{Element.Owner}.{Element.Name}:{Element.ParentPackage} { {Element.GUID} }
< element
connector >
Source Column Notes Target Column
{Connector.SourceColumns} {Connector.Notes} {Connector.TargetColumns}:{Connector.Type}
< connector

< diagram

connector >
{Connector.Name}:{Connector.GUID}
{Connector.SourceColumns}
{Connector.TargetColumns}

source >
{ConnSource.Stereotype}
element >
{Element.Name}:{Element.GUID}
< element
< source
< connector
< package

But in the connector section , we only see the connector Notes (and the Connectory.Type information I threw in for debugging), not the SourceColumns or TargetColumns. However in the model itself, the connector properties correctly list the source and target columns within our two tables.

Is there a way I'm missing to see that information on the reports?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12936
  • Karma: +538/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I'm afraid you'll have to use an SQL fragment to get that information into a report.

There are a number of topics that discuss the details of how the link between attributes (columns). Look for "link to element feature".

Geert

lfgcasey

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
OK following the information in this thread I was able to brute-force the source and target column names and connector notes to appear next to one another on my (very ugly) report.

I used the element>connector>source>linked feature>{LinkedSourceFeature.Name} and element>connector>target>linked feature>{LinkedTargetFeature.Name} to get the column names.

What I found was that I had to move the two tables to the same package and run the report on that package to get to the data within those tables, i.e. the template isn't currently traversing sub-packages. So I have some further reading to do.

lfgcasey

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
I'm afraid you'll have to use an SQL fragment to get that information into a report.

There are a number of topics that discuss the details of how the link between attributes (columns). Look for "link to element feature".

Geert

Geert can you point me to a simple example of embedding SQL into report templates? Or am I completely confused by your statement "you'll have to use an SQL fragment to get that information into a report."?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12936
  • Karma: +538/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Hi,

Check here for more info.

There is also a learning centre article about that subject that explains it step by step with an example.

Geert
« Last Edit: June 20, 2018, 04:47:10 pm by Geert Bellekens »


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12936
  • Karma: +538/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Thanks Simon.

I fixed the hyperlink.

Geert