Showing posts with label business. Show all posts
Showing posts with label business. Show all posts

Monday, March 19, 2012

Lookup transformation using effective dates

Hi,

I need to perform a lookup based on a business key and a date in the source that must be between an effective from and effective to date in the reference table. I've been able to achieve this by updating the SQL caching command on the advanced tab but the performance is very slow. I have 6 lookups of this type in the data flow with a source SQL statement that returns approx 1 million rows and this package takes over 90 minutes to run.

The caching SQL command now looks like this

select * from
(select * from [ReferenceTable]) as refTable
where [refTable].[Key] = ? and ? BETWEEN [refTable].[StartDate] AND [refTable].[EndDate]

and I've set up the parameters so that the business key is the first parameter and the source date is the second.

I have another lookup in the flow that does a straight equality comparison using 2 columns and the Progress tab shows that this lookup is cached (even though I haven't enabled it on the Advanced tab of the transformation editor) but none of the other lookups (using the date) appear to be cached, even though I have enabled them to be.

Can anyone suggest how I can improve the performance?

Thanks.

Hi,

When u use 'caching SQL command', caching can be either partial or none. In the 'none' mode each time it will execute the sql command for input. In the 'partial' mode, it will only cache the previously executed sql command results, so it won't cache any data at the outset.

Other alternative approach is, join ur input with the [reference table] using the key (don't use date). U will give multiple records. Use a conditional split to compare the date with start and end date. The output will be what u want.

|||

Thanks for the tip. Initially, the caching was partial so I would have expected the lookup speed to increase as the process went on ,as more and more of the target reference records were loaded, but this didn't seem to be the case.

I've now changed the package so that it joins directly onto the reference table and the speed has increased dramatically.

Thanks.

Friday, March 9, 2012

looking into rdl file

Some business analysts would like to reverse engineer the ssrs .rdl files by looking into the field mappings and data sources. Do they have to install the client version of visual studio or there is an easier way?

TIA..

You can open the RDL files in Notepad and see that they are written in XML. You can find the query run by looking for the <CommandText> tag, and each field is listed under a <ReportItems> tag. The data source information is also listed in there, under the <ConnectionProperties> tag.

Hope this helps.

Jarret

Looking for very good SQL Server DTS books

Hello, folks.

I'm searching for some good must-have books on SQL Server DTS. If you
are in the DTS business daily, you probably know which books are good
for DTS. I can browse some online book reviews but they are not all
trustworthy...I trust you better...hihi.

Please do me a favor.

Thanks.

TrentI listed a few DTS books at: http://vyaskn.tripod.com/sqlbooks.htm#dts

I personally haven't read any of them. But I did read, "SQL Server 2000 Fast
Answers for SQL Server DBAs and Developers". This is a good book, and
provides you with all the information you need, to get started on DTS:
http://vyaskn.tripod.com/sql_server...ast_answers.htm
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/

"Trent" <pineme@.yahoo.com> wrote in message
news:7ad7239b.0408181244.152a693d@.posting.google.c om...
> Hello, folks.
> I'm searching for some good must-have books on SQL Server DTS. If you
> are in the DTS business daily, you probably know which books are good
> for DTS. I can browse some online book reviews but they are not all
> trustworthy...I trust you better...hihi.
> Please do me a favor.
> Thanks.
> Trent