ID Attributes in Custom Resource Import
Problem
Do you use the ID attributes I provide in the Custom Metadata CSV files only to navigate the relationships provided through a given set of CSV files and then assign different IDs when storing the metadata, or do you retain the IDs I provide and expect me to provide some persistent relationship between the natural data in the ID?
Solution
Regarding the IDs, they are only there to navigate the relationships provided through a given set of CSV files, and then we assign different IDs. The connection to existing objects in the metadata repository (like columns of tables in a database)
is made by specifying the same name and type hierarchy. For example, if you want to connect your transformation to the column ProdDb.CustomerTb.IdCol
in a Teradata database, you need to create:
- A Teradata resource in the Resource file:
"1","Teradata","Teradata","Teradata database"
- A database node in the Node file with a reference to that resource:
"1","","ProdDb","Database","1"
- A table node in the Node file with the database node as a parent:
"2","1","CustomerTb","Table","1"
- A column node in the Node file with the table node as a parent:
"3","2","IdCol","Column","1"
- A direct edge in the Edge file with your transformation as a source and the column node as a target (let’s assume that your transformation node has the ID “4” and your ETL resource has the ID “2”):
"0","4","3","DIRECT","2"
- A node attribute in the Node_Attribute file with your expression:
"4","EXPRESSION","a+b"