3
votes

I have two merge joins in data flow task. I want to set the IsSorted property for inputs of second merge join. But it is giving error as "The IsSorted Property must be set to True on both sources of this transformation." following is the image of this:

img

UPDATE 1

From the answer and the comments below, the IsSorted property can be found in the Data sources (Excel + OLEDB) advanced editor. But the Merge Join Transformation doesn't have this property. And i need to Merge the first Merge Join output with the Excel Source without using a Sort component.

1
I think you have to use "Sort" data flow task before adding input to "Merge" task.DatabaseCoder
I don't want to use Sort task in this.Amol R
I tried to reproduce your problem, but couldn't. I have input of merge join as another merge join. Make sure your practice locations is sorted via advance properties.Prabhat G
But I think Union All works as union operation in sql server. I don't want to do that. I just want to do left join operation.Amol R
Right click on your data source and select Show Advanced Editor.... The IsSorted property is in the Input and Output Properties Tabiamdave

1 Answers

2
votes

Update 2 (Workaround)

After the merge join add a script component in which you will add one output column (will be used as second join key). In the script just assign the original key value to this column.

Then in the script input and output properties, set the Output IsSorted property to True

Example:

enter image description here

Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)

    Output0Buffer.AddRow()
    Output0Buffer.outEmployeeName = Row.EmployeeName
    Output0Buffer.outEmployeeNumber = Row.EmployeeNumber
    Output0Buffer.outLoginName = Row.LogineName


End Sub

Update 1

If your are looking to generate Sorted output from the Merge Join transformation, then i recommend you to follow this link:

Initial Answer

The IsSorted property can be edited from the Advanced Editor,

Just right-Click on the OLEDB Source (or Excel Source if needed) , go to the Input and Output Properties, click on the Output and you will find the IsSorted property in the properties Tab

enter image description here

Then you souhld set the SortKeyPosition for the columns

enter image description here