Showing posts with label situation. Show all posts
Showing posts with label situation. Show all posts

Friday, March 30, 2012

Load Ordering for Dimension and Fact tables

Hi ,

I have situation where I get data from SRC Flat file and have to load Dimensional table and also fact table, using same data flow(have no other choice since I have to unpivot some src data). Since I have to load both tables in same data flow, I have to have a way to put load ordering constraint (I know informatica allows that). Does any one have any idea on how this can be done in SSIS?

I would be really grateful.

Thanks

The SSIS package designer contains a Control Flow tab and a Data Flow Tab. On the Control Flow tab, you would create two Data Flow tasks linked by a precedence constraint. The first task would load the dimension data and the second would load the fact data only if the first task succeeds or completes depending on the precedence conditions you configure.

Was your question this elementary?

|||In my question I said, I can't use two data flows, I have to use only one data flow. So is there a way to this?

Thanks,|||

DW Developer wrote:

Hi ,

I have situation where I get data from SRC Flat file and have to load Dimensional table and also fact table, using same data flow(have no other choice since I have to unpivot some src data). Since I have to load both tables in same data flow, I have to have a way to put load ordering constraint (I know informatica allows that). Does any one have any idea on how this can be done in SSIS?

I would be really grateful.

Thanks

Very very good question. The feature you are referring to is sometimes called "Intrinsic Flow Priority". It doesn't exist in SSIS at the moment and I hope to god they put it into the next release. I have requested it here: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=178058 and have noted that it exists in Informatica. I would appreicate it if you could click-through and add some comments. We're more likely to get it if more people ask for it and give real reasons why they need it.

In the meantime, you can achieve the same using raw files to pass data between different data-flows. This is explained here:

Splitting order detail and order header information from one file into multiple tables
(
http://blogs.conchango.com/jamiethomson/archive/2006/05/22/3974.aspx)

HTH

-Jamie

Friday, March 23, 2012

Little help on simple filter

Hi all,
Before discribing situation i will say that im not programer and dont know much of it
Im using crystal reports 8

Here is situation:

I use data from scala database, enter column name and crystal reports show me (in my case) two colums: first is product code and second is warehouse in wich this product code is, for example i see:

Product Warehouse
code

2146 01
2160072 12
2178 01
2185 01
2199 05
221475 01
221541 01
221676 01
2222 01
2222 12
2224 12

Question: How to set filters or program formula that crystal reports show me only values from products wich are in both warehouses 01 and 12.
In this case:

Product Warehouse
code

2222 01
2222 12

I would be very pleased if you could explain me.
Thanx.Create a View or stored procedure having this code

Select * from yourTable where Productcode in
(
Select Productcode from yourTable
where warehousecode in(01,02) group by Productcode
having count(*)=2
) Tsql

listing only owners with more than one car query help

Hi, here is the problem I have to resolve, I'll try to be very clear about the situation (using MS Access):

- I have 2 tables (well, I have more but only two are relevant to the query) one table stores owner information (owner #, name, surname, phone number...) and the other stores car info (car #, brand, type, color and owner #)

- I want to make a query that gives me the owner info but only for owners that have MORE than one car (ie 2 or more). I tried many approaches but without any success, so far..

- It doesn't matter if I get the same user information 2,3,4 times, I will take the query and build a report with it, and I'll group the cars by users.

Any ideas for me? This really bothers me because I really don't have a clue and I'm sure I missed something easy... :(I'd use:SELECT ownerID
FROM cars
GROUP BY ownerID
HAVING 1 < Count(*);

-PatP|||Thanks, Pat, this correctly lists people with more than one car :) But if I want to da a report with the car info for each car that each owner of more than 1 car (err.. I wanna do a report with the user info + the car info in a report, grouped by the user), I must have the info of each car also.. Your query works like I want, but only list the users and I can't add car info on one line for each car.. Well, I know that sounded pretty bad.. Any idea?

Thanks for the quick answer there, Pat!|||Picky, picky, picky! Ok, at least the logic is good. Now let's try:SELECT *
FROM cars AS a
WHERE 1 < (SELECT Count(*)
FROM cars AS z
WHERE z.ownerID = a.ownerID);...and see if that am more gooder yet even. (How many ways can I butcher the English language... Is there a finite limit?)

-PatP|||All I want to say is: "Thanks alot, this is exactly what I wanted.. I'll be trying to add informations about the owners from the owner's table now.. But this is exactly what I meant!

Thanks for this, Pat, you are a real pal!|||No problemo! Always glad to "stir the pot" any way I can.

-PatPsql