Showing posts with label inner. Show all posts
Showing posts with label inner. Show all posts

Saturday, February 25, 2012

Annoying Inner Join Problem

Greetings SSIS friends,

I have the following problem in SSIS and it's driving me nuts!!!!!

My situation is as follows :

Data Source 1 & Data Source 2are joined using a merge join. This bit works fine.

The output of the above join is then joined to a third data source but this time, I only get 63 rows coming through instead of 77097 even though the join key in the second merge join component is the same as the first one!!!

I thought I was going mad so I decided to see if the same problem occurs if I was to do this with T-SQL. I created 3 temporary tables for each of my data sources.

I did an inner join between tmpTable_Source1 and tmpTable_Source2, I then stored the result in tempTable4

The final inner join was performed between tempTable4 and tempTable3 and the result produced 77097 and not 63 rows.

What the hell is SSIS playing at?! The merge keys I used in T-SQL is the same one I used in my SSIS package!!!!

Are all the inputs of your merge joins actually sorted? The inputs require to be sorted; otherwise you will get unexpected results.|||

Hi Rafael,

Yes my inputs are sorted but anyway, I decided to do away with one of my data sources and combined it as part of the SQL command in my second data source.

Now I have another problem!!!

In my UNION ALL component I get an error for one of my Input fields. It says that the metadata for my input column does not match with the metadata for the associated output column. The trouble is, this was working just fine before and I haven't touched it!!!!

What would cause this kind of problem?!!

Your help would be much appreciated.

|||

Sorry Rafael,

I've solved this little problem. Looks like the data type for one of my input columns was a unicode string.

I will look in to your idea with the other saved package that I've got. Still unsure aboutt the ordering business but will try it and let you know.

Thanks for your help.

|||

Union all transforms are not very friendly when refreshing metadata. I have found faster to delete the faulty column mapping inside of the lookup and added it back. To delete it select the whole row representing the column with the problem and select delete from the right click menu. Then add it back using the drop down lists. Alternative, you could delete the whole Union all and place it back.

Sunday, February 12, 2012

Analysis Services Cube Editor

How does one create outer joins in the cube editor. The documentation state
s
that by default only inner joins are created and to use Visual Database Tool
s
( a Visual Studio module). Any workarounds for this?
thanks in advanceThe most flexible way to do this is to create a view on the relational
database-side.
Analysis Services loads from a view as well as it can from a base table.
Remember however, that you should explicitly cast NULLs to specific values
from the outer join.
Analysis Services treats NULLs as 0's (in measures) and as unknown values
(as dimension keys).
In SQL Server 2005, we have expanded the semantics for handling NULLs, but
for now in SQL Server 2000, we strongly recommend that you specifically cast
NULLs to some pre-defined value prior to exposing the data to Analysis
Services. You will just be a lot happier if you do this.
Hope that helps.
--
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Homer" <Homer@.discussions.microsoft.com> wrote in message
news:8C2079B0-3156-485E-94B4-86A0A7A1F019@.microsoft.com...
> How does one create outer joins in the cube editor. The documentation
states
> that by default only inner joins are created and to use Visual Database
Tools
> ( a Visual Studio module). Any workarounds for this?
> thanks in advance

Analysis Services Cube Editor

How does one create outer joins in the cube editor. The documentation states
that by default only inner joins are created and to use Visual Database Tools
( a Visual Studio module). Any workarounds for this?
thanks in advance
The most flexible way to do this is to create a view on the relational
database-side.
Analysis Services loads from a view as well as it can from a base table.
Remember however, that you should explicitly cast NULLs to specific values
from the outer join.
Analysis Services treats NULLs as 0's (in measures) and as unknown values
(as dimension keys).
In SQL Server 2005, we have expanded the semantics for handling NULLs, but
for now in SQL Server 2000, we strongly recommend that you specifically cast
NULLs to some pre-defined value prior to exposing the data to Analysis
Services. You will just be a lot happier if you do this.
Hope that helps.
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Homer" <Homer@.discussions.microsoft.com> wrote in message
news:8C2079B0-3156-485E-94B4-86A0A7A1F019@.microsoft.com...
> How does one create outer joins in the cube editor. The documentation
states
> that by default only inner joins are created and to use Visual Database
Tools
> ( a Visual Studio module). Any workarounds for this?
> thanks in advance