Skip to main content

I am trying to merge two tables with no common key. How can I do this?

 

1 is from a select returning the database name (dbname) and server name (srvname). For example:

BlueSpark, WINSQLPRD001

 

2 is from a function and returns database role information. Example:

sa, sysadmin

NTSERVICE\\SQLWriter, sysadmin

NTSERVICE\\Winmgmt, sysadmin

NTSERVICE\\MSSQL$INST1, sysadmin

 

I want to take the two items from 1 and add them to each row from 2 such as:

BlueSpark, WINSQLPRD001, sa, sysadmin

BlueSpark, WINSQLPRD001, NTSERVICE\\SQLWriter, sysadmin

BlueSpark, WINSQLPRD001, NTSERVICE\\Winmgmt, sysadmin

BlueSpark, WINSQLPRD001, NTSERVICE\\MSSQL$INST1, sysadmin

 

I've tried using various transformers and all require a common key. So I tried converting the results of 1 into attributes and using that to populate the columns of the output, but it creates separate rows with the results of 1 and 2 - they are not merged such as:

BlueSpark, WINSQLPRD001,,,

,,sa, sysadmin

,,NTSERVICE\\SQLWriter, sysadmin

,,NTSERVICE\\Winmgmt, sysadmin

,,NTSERVICE\\MSSQL$INST1, sysadmin

You can just use a FeatureMerger and put "1" in the Requestor and the Supplier fields.

2021-05-19_15h20_16Set the single record (dbname) as supplier, the other stream as requestor.


Reply