Skip to main content
Question

Merge tables with no join value

  • May 19, 2021
  • 1 reply
  • 250 views

Forum|alt.badge.img

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

1 reply

nielsgerrits
VIP
Forum|alt.badge.img+54

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings