Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Sunday, March 25, 2012

A Word about Meta-data, pass through columns and Derived columns

Here's another one of my bitchfest about stuff which annoy the *** out of me in SSIS (and no such problems in DTS):

Do you ever wonder how easy it was to set up text file to db transform in DTS - I had no problems at all. In SSIS - 1 spent half a day trying to figure out how to get proper column data types for text file - OF Course MS was brilliant enough to add "Suggest Types" feature to text file connection manager - BUT guess what - it sample ONLY 1000 rows - so I tried to change that number to 50000 and clicked ok - BUT ms changed it to 1000 without me noticing it - SO NO WONDER later on some of datatypes did not match. And boy what a fun it is to change the source columns after you have created a few transforms.

This s**hit just breaks... So a word about Derived Columns - pretty useful feature heh? ITs not f***ing useful if it DELETES SOME of the Code itself after there have been changes in dataflow. I cant say how pissed off im about that SSIS went ahead and deleted columns from flow & messed up derived columns just because the lineageIDs dont match.

Meta-data - it would be useful if you could change it and refresh it - im just sick and tired of it that it shows warnings and errors when there's nothing wrong - so after a change i need to doubleclick all my transforms so that those red & yellow boxes would disappear.

Oh and y I passionately dislike Derived columns - so you create new fields based on some data - you do some stuff - combine multiple columns to one, but you have no way saying remove the columns from the pipeline. Y you need it - well if you have 50K + rows with 30+ columns then its EXTRA useless memory overhead for your package.

Hopefully one day I will understand how SSIS works (not an ez task I say) - I might be able to spend more time on development and less time on my bitchfest - UNTIL then --> Another Day - Another Hassle with SSISOh - i also forgot - trying to get to columns to appear in the right order is no picnic either. If you are dealing with 80+ you would like them to always appear on same order (alphabetic or otherwise meaningful) but SSIS seems to shuffle the order also every now and then|||

TheViewMaster wrote:

Here's another one of my bitchfest about stuff which annoy the *** out of me in SSIS (and no such problems in DTS):
Do you ever wonder how easy it was to set up text file to db transform in DTS - I had no problems at all. In SSIS - 1 spent half a day trying to figure out how to get proper column data types for text file - OF Course MS was brilliant enough to add "Suggest Types" feature to text file connection manager - BUT guess what - it sample ONLY 1000 rows - so I tried to change that number to 50000 and clicked ok - BUT ms changed it to 1000 without me noticing it - SO NO WONDER later on some of datatypes did not match. And boy what a fun it is to change the source columns after you have created a few transforms.

If you're going to rely on a computer to "guess" what the column data-types should be then you deserve all that's coming to you. "Suggest Types" is just that. A suggestion. It is your responsibility to make sure the column data-types are correct.

TheViewMaster wrote:


This s**hit just breaks... So a word about Derived Columns - pretty useful feature heh? ITs not f***ing useful if it DELETES SOME of the Code itself after there have been changes in dataflow. I cant say how pissed off im about that SSIS went ahead and deleted columns from flow & messed up derived columns just because the lineageIDs dont match.

It doesn't delete columns itself. Only if you do something to cause that. Lineage IDs are vital to how the pipeline engine works - this behaviour is absolutely correct and there are justifiable reasons for it.

I have never seen it delete code without there being some perfectly good, user-produced, reason.

TheViewMaster wrote:


Meta-data - it would be useful if you could change it and refresh it - im just sick and tired of it that it shows warnings and errors when there's nothing wrong - so after a change i need to doubleclick all my transforms so that those red & yellow boxes would disappear.

You can. If downstream components are still affected then it will flag this to you. What you will probably find is that it won't automatically fix components that are downstream of asynchronous components. That is absolutely correct. What SSIS will not do is make changes without telling you about it - it expects you to make the decisions, it will not make decisions for you. In this regard it is a huge improvement from DTS which would often make guesses about things which could be wrong.

TheViewMaster wrote:


Oh and y I passionately dislike Derived columns - so you create new fields based on some data - you do some stuff - combine multiple columns to one, but you have no way saying remove the columns from the pipeline. Y you need it - well if you have 50K + rows with 30+ columns then its EXTRA useless memory overhead for your package.

Wrong again. Removing columns from memory (and all the subsequent memory management that must occur) at execution time after they are no longer required was considered to be too detrimental an overhead in terms of pipeline performance. The pipeline is there to produce screamingly fast data movement and anything that impacts that (such as removing unused columns) will not be done.

TheViewMaster wrote:


Hopefully one day I will understand how SSIS works (not an ez task I say)

Absolutely correct. Its not easy - its a huge product and there's loads to understand. There is a learning curve with SSIS as there is any other product. If you're not prepared to go through that curve then that's fine - don't use the product. But don't moan about it endlessly.

TheViewMaster wrote:

- I might be able to spend more time on development and less time on my bitchfest - UNTIL then --> Another Day - Another Hassle with SSIS

I don't really know why I'm bothering replying. You obviously have decided that SSIS is useless without even trying to understand the justification for any of these behaviours. I'm biting my tongue till it hurts, believe me.

I hope as you come to learn more about SSIS (if you choose to continue down this route) you will understand some of the justifications for the behaviour that is inherent in the UI. There are definately improvements to be made, I won't disagree with you there, and if you have legitamate requests for enhancements (such as your comment about reordering of columns) then there are proper channels for submitting those requests. Whinging on this forum is not one of them.

-Jamie

|||1000 rows is the scan limit of the "suggest types" feature.

Aren't you prompted to fix invalid metadata when changes upstream are made?

I hear you on being able to drop columns from the dataflow whenever you'd like. That would be a nice feature.

But I have to ask... With your growing list of issues with SSIS, I wonder:
- Have you filled out bug/feature requests?
- Is SSIS the right tool for you? Perhaps something like Informatica would be better suited for you.

Phil|||

TheViewMaster wrote:

Oh - i also forgot - trying to get to columns to appear in the right order is no picnic either. If you are dealing with 80+ you would like them to always appear on same order (alphabetic or otherwise meaningful) but SSIS seems to shuffle the order also every now and then

SSIS indeed does not gaurantee column ordering. SSIS will try to maintain order from the source but there are cases where it won't. For example if you go through an asynchronous component then the ordering is however that component puts it on the output since it is effectively a "new source".

Thanks
Mark

|||

Jamie Thomson wrote:


I don't really know why

I'm bothering replying. You obviously have decided that SSIS is useless

without even trying to understand the justification for any of these

behaviours. I'm biting my tongue till it hurts, believe me.

Please dont stop - I am trying to understand how things work - it's just it can be frustrating spending too much time on stuff - this forum has deffinately being very useful thanks to you and all other responders

Phil Brammer wrote:

1000 rows is the scan limit of the "suggest types" feature.

Aren't you prompted to fix invalid metadata when changes upstream are made?

I hear you on being able to drop columns from the dataflow whenever you'd like. That would be a nice feature.

Yes - i figured it out - thank god I had backup copy of the version of SSIS package somewhere. The issue is that i changed some transformation (instead of merge join - a lookup) and that caused LineageIDs to not match. and in the transform to rawfile - there were columns like CITY_NAME renamed to CityName - and of course SSIS wasnt able to match them by name. So even with finding that piece of tranformation from backup i still had to do a lot of manual work to get all columns back.

- Have you filled out bug/feature requests?


- I tried once & only once - its a hassle to fill it out

- Is SSIS the right tool for you? Perhaps something like Informatica would be better suited for you.


It is "free" - so it must be the right one.
The learning curve is tough on that one - reminds me of moving from vb6/asp to .Net = a lot of hangst and head-banging.
But I start to see the light & still the dev model of SSIS outweighs the hurdles with some parts

Thursday, March 22, 2012

a visual basic script to DTS

Hello I am trying to convert a VB script someone wrote for my company into a DTS package that will fire automatically whenever the file is updated on the server. I am using vb.net for the firing of the DTS package, but I am having trouble writting the DTS package itself. This is what the code looks like now

If fso.FileExists(cSource) Then
With cne
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & cSource & ";" _
& "Extended Properties=Excel 8.0"
.Open
cSQL = "SELECT * FROM " & sSheet
Set rse = .Execute(cSQL)
End With

While Not rse.EOF
i = i + 1
Me.Label1.Caption = "Updating Sold: " & i
Me.Refresh
If Not IsNull(rse("VEHICLE-STOCK-NO###")) Then
sSearch = "'" & rse("VEHICLE-STOCK-NO###") & "'"
cSQL = "UPDATE Inventory SET SoldDate = '" & rse("FNLZ-DT") & "', "
cSQL = cSQL & "LastUpdate = '" & Now & "' WHERE StockNo = " & sSearch
cSQL = cSQL & " AND SoldDate IS NULL"
cn.Execute (cSQL)
End If
rse.MoveNext
Wend
rse.Close
cne.Close
End If


So basically I have an excel file that is downloaded once a week and then I run this program, well I am having some toubles with making it a DTS

I need to convert this into an active X transfermation code I think
If Not IsNull(rse("VEHICLE-STOCK-NO###")) Then
sSearch = "'" & rse("VEHICLE-STOCK-NO###") & "'"
cSQL = "UPDATE Inventory SET SoldDate = '" & rse("FNLZ-DT") & "', "
cSQL = cSQL & "LastUpdate = '" & Now & "' WHERE StockNo = " & sSearch
cSQL = cSQL & " AND SoldDate IS NULL"
end if

Thanks a lot

DamianSearch SQLDTS (http://www.sqldts.com) website for code examples and more information.

HTHsql

Sunday, March 11, 2012

a solution

Hi,

I know this issue exisits in DTS but needs to check still is in SSIS, Also you guys may have a better solution for it.

Issue: When I try to import a column from excel which has data like A,B,C,D,E,4,5 in the destination table has the data type as varchar it imports only A,B,C,D,E and 4 & 5 as nulls. How to fix this.

Set the Excel connection Extended Property, IMEX=1.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1294377&SiteID=1|||Thanks, it worked. Appreciated.|||

Imex=1 worked for all the cells except few, this column has data like below

07AWA38V36 0717062042 715018020 07BCB01R17

even in this column some has been imported correctly and few are imported like 7.15E+...

Note: My desination column data type in Varchar.

|||Make sure that Excel doesn't have any formatting for the problem cells or the problem column.|||In the above example for the second row the data was formatted as text becasue it has the leading Zero where as the third is not formatted becuase it doesnt have any leading zero. the issue was in the third row coverting as 7.15E+.. while running the SSIS|||

yes, i′ve got just the same problem.

incredibly it didn′t happen the first time i runned the dts, but now..

|||

..and i just got it..

I selected the whole worksheek, converted the cells into numeric type (format/cells/numeric) and saved. Then i converted the cells into General type again, saved and runned the dts. And it works now.

Better not to use Text types when it happens. When you′ve got a Text type it doesnt work properly, and if you change to General => it doesnt work either. But if you had Numeric types and change to General then it works.

|||

When I change this to Numeric then I will loose the leading zero in the 2 & 3 row.

|||

? no, you wont..

It′s just an excel fail, i doesnt catch properly that there′s a number, not a text, when you had a text previously

a solution

Hi,

I know this issue exisits in DTS but needs to check still is in SSIS, Also you guys may have a better solution for it.

Issue: When I try to import a column from excel which has data like A,B,C,D,E,4,5 in the destination table has the data type as varchar it imports only A,B,C,D,E and 4 & 5 as nulls. How to fix this.

Set the Excel connection Extended Property, IMEX=1.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1294377&SiteID=1|||Thanks, it worked. Appreciated.|||

Imex=1 worked for all the cells except few, this column has data like below

07AWA38V36 0717062042 715018020 07BCB01R17

even in this column some has been imported correctly and few are imported like 7.15E+...

Note: My desination column data type in Varchar.

|||Make sure that Excel doesn't have any formatting for the problem cells or the problem column.|||In the above example for the second row the data was formatted as text becasue it has the leading Zero where as the third is not formatted becuase it doesnt have any leading zero. the issue was in the third row coverting as 7.15E+.. while running the SSIS|||

yes, i′ve got just the same problem.

incredibly it didn′t happen the first time i runned the dts, but now..

|||

..and i just got it..

I selected the whole worksheek, converted the cells into numeric type (format/cells/numeric) and saved. Then i converted the cells into General type again, saved and runned the dts. And it works now.

Better not to use Text types when it happens. When you′ve got a Text type it doesnt work properly, and if you change to General => it doesnt work either. But if you had Numeric types and change to General then it works.

|||

When I change this to Numeric then I will loose the leading zero in the 2 & 3 row.

|||

? no, you wont..

It′s just an excel fail, i doesnt catch properly that there′s a number, not a text, when you had a text previously

a solution

Hi,

I know this issue exisits in DTS but needs to check still is in SSIS, Also you guys may have a better solution for it.

Issue: When I try to import a column from excel which has data like A,B,C,D,E,4,5 in the destination table has the data type as varchar it imports only A,B,C,D,E and 4 & 5 as nulls. How to fix this.

Set the Excel connection Extended Property, IMEX=1.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1294377&SiteID=1|||Thanks, it worked. Appreciated.|||

Imex=1 worked for all the cells except few, this column has data like below

07AWA38V36 0717062042 715018020 07BCB01R17

even in this column some has been imported correctly and few are imported like 7.15E+...

Note: My desination column data type in Varchar.

|||Make sure that Excel doesn't have any formatting for the problem cells or the problem column.|||In the above example for the second row the data was formatted as text becasue it has the leading Zero where as the third is not formatted becuase it doesnt have any leading zero. the issue was in the third row coverting as 7.15E+.. while running the SSIS|||

yes, i′ve got just the same problem.

incredibly it didn′t happen the first time i runned the dts, but now..

|||

..and i just got it..

I selected the whole worksheek, converted the cells into numeric type (format/cells/numeric) and saved. Then i converted the cells into General type again, saved and runned the dts. And it works now.

Better not to use Text types when it happens. When you′ve got a Text type it doesnt work properly, and if you change to General => it doesnt work either. But if you had Numeric types and change to General then it works.

|||

When I change this to Numeric then I will loose the leading zero in the 2 & 3 row.

|||

? no, you wont..

It′s just an excel fail, i doesnt catch properly that there′s a number, not a text, when you had a text previously

Sunday, February 19, 2012

A problem with DTS Import/Export wizard....

Hello,
I am trying to replace data in the "region" column in table 2 with data in
the "region" column in table 1...in other words 1 is the source and 2 is the
destination. I go thru the wizard and then use a query to specify the data
to transfer. I go into the query builder and select the column that I want
transfered. I don't specify a sort order or criteria. The query statement
is thus:
select [Customers].[Region]
from [Customers]
easy enough...
I then select the source table and click transform and I do not see an
option to replace the data only append, create destination table, and delete
rows in destination table.
Is this all the functionality of the wizard gives me?
Do I need to create my own script?
Thanks
Ken S.I am sure that someone can help, but we will need some additional =information...
Do the tables (table1 and table2) share a common column that you can =JOIN on in order to perform an update?
What other data exists within Table2? Does all the data come from =Table1? Can you simply delete all the rows within Table2 and insert =from Table1?
-- Keith
"SMAN" <ksanti@.nycap.rr.com> wrote in message =news:eJUmwnjxDHA.2456@.TK2MSFTNGP12.phx.gbl...
> Hello,
> > I am trying to replace data in the "region" column in table 2 with =data in
> the "region" column in table 1...in other words 1 is the source and 2 =is the
> destination. I go thru the wizard and then use a query to specify the =data
> to transfer. I go into the query builder and select the column that I =want
> transfered. I don't specify a sort order or criteria. The query =statement
> is thus:
> > select [Customers].[Region]
> from [Customers]
> > easy enough...
> > I then select the source table and click transform and I do not see an
> option to replace the data only append, create destination table, and =delete
> rows in destination table.
> > Is this all the functionality of the wizard gives me?
> > Do I need to create my own script?
> > Thanks
> > Ken S.
> >|||Thanks Keith...
both tables are identical tables with the same structure and row count. The
region column in table 1 is the data I want in table 2's region column.
Perhaps your solution of deleting all the rows in table 2 and replacing with
table 1 rows is the way to go.
Thanks
Ken
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:ejEZiujxDHA.2328@.TK2MSFTNGP10.phx.gbl...
I am sure that someone can help, but we will need some additional
information...
Do the tables (table1 and table2) share a common column that you can JOIN on
in order to perform an update?
What other data exists within Table2? Does all the data come from Table1?
Can you simply delete all the rows within Table2 and insert from Table1?
--
Keith
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:eJUmwnjxDHA.2456@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I am trying to replace data in the "region" column in table 2 with data in
> the "region" column in table 1...in other words 1 is the source and 2 is
the
> destination. I go thru the wizard and then use a query to specify the
data
> to transfer. I go into the query builder and select the column that I
want
> transfered. I don't specify a sort order or criteria. The query
statement
> is thus:
> select [Customers].[Region]
> from [Customers]
> easy enough...
> I then select the source table and click transform and I do not see an
> option to replace the data only append, create destination table, and
delete
> rows in destination table.
> Is this all the functionality of the wizard gives me?
> Do I need to create my own script?
> Thanks
> Ken S.
>|||Since the tables are identical you could also update the data with an =update statement:
UPDATE table2 SET region =3D B.region
FROM table2 A JOIN table1 B ON A.ThePrimaryKeyColumn =3D =B.ThePrimaryKeyColumn
SELECT @.@.rowcount
-- Keith
"SMAN" <ksanti@.nycap.rr.com> wrote in message =news:uKByO2jxDHA.3116@.tk2msftngp13.phx.gbl...
> Thanks Keith...
> > both tables are identical tables with the same structure and row =count. The
> region column in table 1 is the data I want in table 2's region =column.
> Perhaps your solution of deleting all the rows in table 2 and =replacing with
> table 1 rows is the way to go.
> > Thanks
> > Ken
> > > "Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
> news:ejEZiujxDHA.2328@.TK2MSFTNGP10.phx.gbl...
> I am sure that someone can help, but we will need some additional
> information...
> > Do the tables (table1 and table2) share a common column that you can =JOIN on
> in order to perform an update?
> > What other data exists within Table2? Does all the data come from =Table1?
> Can you simply delete all the rows within Table2 and insert from =Table1?
> > --
> Keith
> > > "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:eJUmwnjxDHA.2456@.TK2MSFTNGP12.phx.gbl...
> > Hello,
> >
> > I am trying to replace data in the "region" column in table 2 with =data in
> > the "region" column in table 1...in other words 1 is the source and =2 is
> the
> > destination. I go thru the wizard and then use a query to specify =the
> data
> > to transfer. I go into the query builder and select the column that =I
> want
> > transfered. I don't specify a sort order or criteria. The query
> statement
> > is thus:
> >
> > select [Customers].[Region]
> > from [Customers]
> >
> > easy enough...
> >
> > I then select the source table and click transform and I do not see =an
> > option to replace the data only append, create destination table, =and
> delete
> > rows in destination table.
> >
> > Is this all the functionality of the wizard gives me?
> >
> > Do I need to create my own script?
> >
> > Thanks
> >
> > Ken S.
> >
> >
> >

Monday, February 13, 2012

A lot Of Questions!!!

Good Morning..

i have started developing on DTS recently. and i have a few question about "How-To" issues.

Hope you guys can help

1) I noticed, whenever i want to "redirect row" whenever an error happen, i need to set my AccessMode to OpenRowSet... This mode as i noticed, cant be used when i am tranferring data into a sql table which has primary key set

e.g. Ms Access which has identity -> SQL table with PK set

Is there anyway, to capture the row error in my situation?

2) Another question is, in a data flow... can i have a source which has multiple output arrow.

Sorry for the inconvenince,Thank you in advance

I can hurry up and answer #2 for you. Place your output of the source into a multitask transformation. You'll get as many outputs as you want then.

Question though... Are you using the old DTS, or are you using SQL Server Integration Services?|||

Hi Phil thanks for the fast reply

I am using SSIS in SQL 2005....

For the first question...i have found a workaround...

In the destination table which has primary key and auto increment set to yes.. Before tranferring data into that particular table set the auto increment to "no"... With that we can "return row" as error output.....

By the way Phil...i cant c any multitask trnaformation in my data flow toolbox, all i c is a multicast.. are u referring to old DTS..

Thanks a lot guys ...

|||

I think Phill meant 'Multicast' transformation; it would privide n inputs out of a single output

Rafael Salas

|||

Rafael Salas wrote:

I think Phill meant 'Multicast' transformation; it would privide n inputs out of a single output

Rafael Salas

Yep, "multicast". Yesterday was not a good typing day for me!

Thursday, February 9, 2012

A good book to start with

I am not a very begginer with sql server and I am familiar with some
concepts in sql server like DTS packages,Reporting services and database
objects .I'd like to start learning OLAP and data mining and I just wondered
if somebody can give me a path and introduce me a good book to start with.
Thanks
RayRayAll wrote:
"I'd like to start learning OLAP and data mining and I just wondered if
somebody can give me a path and introduce me a good book to start
with."
I recommend any of the following:
"Data Mining: Concepts and Techniques"
by Jiawei Han, Micheline Kamber
ISBN: 1558604898
"Data Mining : Practical Machine Learning Tools and Techniques"
by Ian H. Witten, Eibe Frank
ISBN: 0120884070, 1558605525
"Predictive Data Mining : A Practical Guide"
by Sholom M. Weiss, Nitin Indurkhya
ISBN: 1558604030
"Solving Data Mining Problems Through Pattern Recognition"
by Ruby L. Kennedy et al
ISBN: 0130950831
-Will Dwinnell
http://will.dwinnell.com|||A more basic and general view (recommended) is:
- MS Olap Unleashed (right, for SQL 7, but pretty usefull)
- MDX Solutions, George Spofford
Michael
"RayAll" <RayAll@.microsft.com> escribi en el mensaje
news:emNYRu8LFHA.1308@.TK2MSFTNGP15.phx.gbl...
>I am not a very begginer with sql server and I am familiar with some
>concepts in sql server like DTS packages,Reporting services and database
>objects .I'd like to start learning OLAP and data mining and I just
>wondered if somebody can give me a path and introduce me a good book to
>start with.
> Thanks
> Ray
>|||Again, back with SQL7, but very good, try Erik Thompsen's book
Microsoft OLAP Solutions
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.
"MPS" <mps@.udd.cl> wrote in message
news:uyTcyRIMFHA.1300@.TK2MSFTNGP10.phx.gbl...
> A more basic and general view (recommended) is:
> - MS Olap Unleashed (right, for SQL 7, but pretty usefull)
> - MDX Solutions, George Spofford
> Michael
> "RayAll" <RayAll@.microsft.com> escribi en el mensaje
> news:emNYRu8LFHA.1308@.TK2MSFTNGP15.phx.gbl...
>
>|||Another really good book that'll get your thinking started in the right way:
Fast Track to MDX
Mark Whitehorn, Robert Zare and Mosha Pasumansky
"RayAll" <RayAll@.microsft.com> wrote in message
news:emNYRu8LFHA.1308@.TK2MSFTNGP15.phx.gbl...
>I am not a very begginer with sql server and I am familiar with some
>concepts in sql server like DTS packages,Reporting services and database
>objects .I'd like to start learning OLAP and data mining and I just
>wondered if somebody can give me a path and introduce me a good book to
>start with.
> Thanks
> Ray
>