Engine Thread Property Of Data Flow Task

Apr 3, 2006

Hi guys,

The default Engine Thread property of a data flow task is set to 5, is this the best setting? what if I would like to run complex data flow tasks on multi-processor machines, should I increase the engine thread? If so, then what is the recommended Engine Thread number for running complex data flow tasks in a multi processor system?

Even if i am running simple data flow tasks on a multi processor machine, should I change the engine thread?

Thanks!
Kervy

View 3 Replies


ADVERTISEMENT

How Do I Modify Union Data Flow Task Property?

Apr 4, 2008

I've created a Union All data flow task which unions string fields from a couple of queries. I found that I needed to increase the length of the string field in the queries. Increasing the length causes an error in my Union All task. I can't seem to find a way to change the property of the fields in the Union All task. Most of the other data flow tasks have an advanced editor where I can change the length or type of the fields on the input and or output. I can't seem to find this for the Union All task.

Is there any way short of deleting the Output column and recreating it? (I like the order of my original output columns)

Thanks,
Bill Webster

View 6 Replies View Related

Using Disable Property For Data Flow Task Dynamically ?

Mar 18, 2008

hello guys,

I am having trouble with using disable property in the expression for data flow task. Here is the issue as explained below-

lets say i have 3 tables TableA, TableB, TableC from which i need to export data. So i create a table (TableList) where I save these table names and a unique id to these tables. e.g.

TableList will have-
TableName TableID
TableA 1
TableB 2
TableC 3


in the ssis package select these tableNames & Ids from tableList in Execute SQL Task. And assign the result set to a variable object (@TableList.

Then i use For Each Loop Container (For Each ADO Enumerator) , to loop through these tablesnames & iDs

Inside this loop container, i define three data flow tasks one for each table. So i have DataFlowTaskA (For TableA), DataFlowTaskB(For TableB), DataFlowTaskC (For TableC).

Now for a given table selected in the iteration, only the corresponding DataFlow Task should be exeuted. e.g. For the 1st iteration, if TableA is selected then only DataFlowTaskA should be executed and DataFlowTaskB& C should be skipped.

In order to achieve this, I am using a 3 variable @FlagA, @FlagB, @FlagC (type Boolean) one for each Table. and use the value of these flags for the "Disable" property of the data flow task (so @FlagA will be used for Disable property in the Expression for Data FlowTaskA, and so on..)

SotThe First Step inside the Loop, I use Script Task. (Input for the script task: read variable is @TableID and Read/Write varaibles are these 3 flags)

In this script task, I initialize these flags to true or false appropriately. So this is what i do


If (Dts.Variables("TableID").Value.ToString = "1") Then
Dts.Variables("@FlagA").Value = False
Else
Dts.Variables("@FlagA").Value = True

End If


If (Dts.Variables("TableID").Value.ToString = "2") Then
Dts.Variables("@FlagB").Value = False
Else
Dts.Variables("@FlagB").Value = True

End If


So in the 1st iteration, (if TableA comes) @FlagA=False and B&C will be True.
So the Disable property for DataFlowTask will be set false and for others it will be set to True. Thus, only DataFlowTaskA will be executed.

And this action should be repeated for each input table. this is the logic.



However only for the 1st iteration(say TableA is selected) it behaves as above. i.e. DataFlowTaskA is executed and DataFlowTaskB & C are skipped. But in the 2nd iteration(say TableB is selected) , it again executes DataFlowTaskA and doesnt exeute B & C (where it should have executed B & skipped A&C).

I do set daelay validation to true for all these but it still it doesnt working as expected. Even I checked the values for all the flags for each iteration and they seem to get the correct values. But somehow Diable propery in the expression not behaving as it should.

Am i missing anything. Do i need to set any other property to make this work.


I apprecite any help.

Thanks

View 3 Replies View Related

Lookup Task Data Flow Transformation Causes Data Flow Task To Hang?

Dec 28, 2007

Hi,
I'm trying to implement an incremental data pull (Oracle to SQL) based on Andy's blog:
http://sqlblog.com/blogs/andy_leonard/archive/2007/07/09/ssis-design-pattern-incremental-loads.aspx

My development machine is decent: 1.86 GHz, Intel core 2 CPU, 3 GB of RAM.
However it seems the data flow task gets hung whenever I test the package against the ~6 million row source, as can be seen from these screenshots. I have no memory limitations on the lookup transformation. After the rows have been cached nothing happens. Memory for the dtsdebug process hovers around 1.8 GB and it uses 1-6 percent of CPU resources continuously. I am not using fast load to insert new records into my sql target table. (I am right clicking Sequence Container 3 and executing this container NOT the entire package in the screenshots)

http://i248.photobucket.com/albums/gg168/boston_sql92/1.jpg
http://i248.photobucket.com/albums/gg168/boston_sql92/2.jpg
http://i248.photobucket.com/albums/gg168/boston_sql92/3.jpg
http://i248.photobucket.com/albums/gg168/boston_sql92/4.jpg
http://i248.photobucket.com/albums/gg168/boston_sql92/5.jpg
http://i248.photobucket.com/albums/gg168/boston_sql92/6.jpg


The same package works fine against a similar test table with 150k rows.
http://i248.photobucket.com/albums/gg168/boston_sql92/7.jpg
http://i248.photobucket.com/albums/gg168/boston_sql92/8.jpg

The weird thing is it only takes 24 minutes for a full refresh of the entire source table from Oracle to the SQL target table.
Any hints,advice would be appreciated.

View 18 Replies View Related

Error: The Task With The Name Data Flow Task And The Creation Name DTS.Pipeline.1 Is Not Registered For Use On This Computer

May 4, 2006



Hi,

I am trying to create a simple BI Application for SSIS. In Visual Studio 2005 I just get a Data Flow Task from the toolbar and add it to the project. When I double click it I get the following error:

The task with the name "Data Flow Task" and the creation name "DTS.Pipeline.1" is not registered for use on this computer.

Then when I try to delete it it gives this other error:

Cannot remove the specified item because it was not found in the specified Collection.

I am creating this application in an administrator account in this computer, so I doubt the problem is related to permissions. I am running SQL Server 2005 and Visual Studio 2005 in WinXP Tablet PC Edition.

Any suggestions why this is happening and how to fix it?

View 17 Replies View Related

Compare Performance (Execute SQL Task Insert And Data Flow Task)

Mar 12, 2008



I am using SQL 2005 SSIS. I am joining several large tables and then the move result into another table in the same database.

I would like know which method is faster:


Use Execute SQL Task to insert the result set to the target table

Use the Data Flow Task to insert the result set to the target table. (Use OLE DB source to execute SQL command and then use the SQL destination)
Could you tell me why then other is slower?

Thanks.

View 7 Replies View Related

Can A Result Set From SQL Script Task Be Used As A Source For Data Flow Task?

Oct 2, 2007

I have a stored procedure that is executed via a sql script task that returns a full result set. I map this result set to a variable or object type. Is there a way to use this variable as a data source in a subsequent data flow task?

A.

View 14 Replies View Related

Error Using Row Count Task In Data Flow Task

Dec 20, 2007

Hi,

I'm trying to get a record count out of a databse using OLE DB Source and row count tasks but keep getting an error. I set up a variable as int32 and select the variable name in the row count task and when I go to the Input Columns tab to select a field to count, it gives me this error:

Error at Data Flow Task[Row Count[505]]: The component "Row Count" (505) has forbidden the requested use of the input column with lineage ID 32.

I don't even know what this means?

thanks,

View 4 Replies View Related

Moving Files (split From An Existing Thread-SSIS Equivalent To DTS Transform Data Task Properties)

May 7, 2007

Hi JayH (or anyone). Another week...a new set of problems. I obviously need to learn .net syntax, but because of project deadlines in converting from DTS to SSIS it is hard for me to stop and do that. So, if someone could help me some easy syntax, I would really appreciate it.



In DTS, there was a VBScript that copied a set of flat files from one directory to an archive directory after modifying the file name. In SSIS, the directory and archive directory will be specified in the config file. So, I need a .net script that retrieves a file, renames it and copies it to a different directory.

Linda



Here is the old VBScript Code:

Public Sub Main()

Option Explicit

Function Main()

Dim MovementDataDir

Dim MovementArchiveDataDir

Dim MovementDataFile

Dim MovementArchiveDataFile

Dim FileNameRoot

Dim FileNameExtension, DecimalLocation

Dim CurMonth, CurDay

Dim FileApplicationDate

Dim fso ' File System Object

Dim folder

Dim FileCollection

Dim MovementFile

'======================================================================

'Create text strings of today's date to be appended to the archived file.

FileApplicationDate = Now

CurMonth = Month(FileApplicationDate)

CurDay = Day(FileApplicationDate)

If Len(CurMonth) = 1 Then

CurMonth = "0" & CurMonth

End If

If Len(CurDay) = 1 Then

CurDay = "0" & CurDay

End If

FileApplicationDate = CurMonth & CurDay & Year(FileApplicationDate)

'=====================================================================

' Set the movement data directory from the global variable.

MovementDataDir = DTSGlobalVariables("gsMovementDataDir").Value

MovementArchiveDataDir = DTSGlobalVariables("gsMovementDataArchiveDir").Value

fso = CreateObject("Scripting.FileSystemObject")

folder = fso.GetFolder(MovementDataDir)

FileCollection = folder.Files

' Loop through all files in the data directory.

For Each MovementFile In FileCollection

' Get the full path name of the current data file.

MovementDataFile = MovementDataDir & "" & MovementFile.Name

' Get the full path name of the archive data file.

MovementArchiveDataFile = MovementArchiveDataDir & "" & MovementFile.Name

DecimalLocation = InStr(1, MovementArchiveDataFile, ".")

FileNameExtension = Mid(MovementArchiveDataFile, DecimalLocation, Len(MovementArchiveDataFile) - DecimalLocation + 1)

FileNameRoot = Mid(MovementArchiveDataFile, 1, DecimalLocation - 1)

MovementArchiveDataFile = FileNameRoot & "_" & FileApplicationDate & FileNameExtension

If (fso.FileExists(MovementDataFile)) Then

fso.CopyFile(MovementDataFile, MovementArchiveDataFile)

' If the archive file was coppied, then delete the old copy.

If (fso.FileExists(MovementArchiveDataFile)) Then

fso.DeleteFile(MovementDataFile)

End If

End If

Next

fso = Nothing

folder = Nothing

FileCollection = Nothing

Main = DTSTaskExecResult_Success

End Function

View 6 Replies View Related

Recompile SQL Task With Data Flow Task

Feb 23, 2007

Hi,


I created a package with SQL 2005. The package gets the Access DB and then inserts it into SQL Server.

If I open the package in .NET, I can see the SQL Task and Data Flow Task. The SQL Task has a property sqlstatementsource, which has the necxessary SQL code to create the tables.

How can I tell the SQL Task to recompile the SQL code if I give it another DB name, because the tables differ and don't map in the Data Flow Task


Thanks

View 3 Replies View Related

New Title In Thread : Error/bug In ASMX ? - Parameters And Toolbar Property In DevInfo

Apr 20, 2007

Hi all,



I am trying to build a reportviewer so that I could use reporting services (due to company's security policy).



I am getting a VERY weird error here.



Before I get on ahead, here is the scenario.

I had created a rdl that will give a certain report based on two parameters. At the moment, I didn't assign the parameters to any default values since i don't want the report to start running. These two parameters are run based on stored procedures to get the starting date and an ending date.



I had tried to view this report on Report Manager and it works.



I had set the parameters this way. NOTE: ReportingServer is the disgused name of the reportserver I am using for privacy purposes




Code Snippet

Dim rs As New ReportingServer.ReportingService

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

'Render arguments

Dim results() As Byte

Dim format As String = "HTML4.0"

Dim historyID As String = Nothing

'PDF Rendering extensions don't have any useful DeviceInfo settings

'the toolbar shown below only affects HTML rendering

Dim devInfo As String = "<DeviceInfo><HTMLFragment>True</HTMLFragment><JavaScript>True</JavaScript><Toolbar>True</Toolbar><Parameters>True</Parameters></DeviceInfo>"

Dim credentials() As ReportingServer.DataSourceCredentials = New ReportingServer.DataSourceCredentials() {}

Dim showHideToggle As String = ""

Dim encoding As String = ""

Dim mimeType As String = ""

Dim warnings() As ReportingServer.Warning = New ReportingServer.Warning(0) {}

Dim reportHistoryParameters() As ReportingServer.ParameterValue = New ReportingServer.ParameterValue() {}

Dim streamIDs() As String = Nothing

Dim sh As ReportingServer.SessionHeader = New ReportingServer.SessionHeader

rs.SessionHeaderValue = sh





But when I started building this reportviewer.aspx, it gives me this error on the following line:-






Code Snippet

results = rs.Render(ReportPath, format, historyID, devInfo, Parameters, credentials, _

showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)









with the error



{"This report requires a default or user-defined value for the report parameter 'start_date'. To run or subscribe to this report, you must provide a parameter value. --> This report requires a default or user-defined value for the report parameter 'start_date'. To run or subscribe to this report, you must provide a parameter value. --> This report requires a default or user-defined value for the report parameter 'start_date'. To run or subscribe to this report, you must provide a parameter value."}



this is occuring on the line where it needs to render the report.



As simple as it is, i tried the following:-

NOTE: some variables has been changed to protect some identity.






Code Snippet

Dim ReportRenderer As New RenderSQLReports

Dim Parameters As int.rrd.sqlreporting_test.ParameterValue() = Nothing



ReportRenderer.RenderReport(Parameters, "/Folder/reportname", "pdffilename.pdf")









What I don't get is that i made sure that it doesn't have any default values.



So I went into this scenario and tried teh following:-






Code Snippet

Dim ReportRenderer As New RenderSQLReports

Dim Parameters() As Reportingservices.ParameterValue = New Reportingservices.ParameterValue(1) {}


Parameters(0) = New Reportingservices.ParameterValue

Parameters(0).Label = "start_date"

Parameters(0).Name = "start_date"

Parameters(0).Value = "10/1/1999 12:00:00 AM"

Parameters(1) = New Reportingservices.ParameterValue

Parameters(1).Label = "end_date"

Parameters(1).Name = "end_date"

Parameters(1).Value = "11/1/1999 12:00:00 AM"



ReportRenderer.RenderReport(Parameters, "/Folder/reportname", "pdffilename.pdf")







And this is what happens. It blows up on this line again. with this error.


Code Snippet

results = rs.Render(ReportPath, format, historyID, devInfo, Parameters, credentials, _

showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)

With the errors



{"Default value or value provided for the report parameter 'start_date' is not a valid value. --> Default value or value provided for the report parameter 'start_date' is not a valid value. --> Default value or value provided for the report parameter 'start_date' is not a valid value."}



This is probably occuring because the date I had provided is not found in the list of dates. I really don't want to default a date at the moment, to allow the user to select a date.



So I finally gave it a date...... a valid date.






Code Snippet

Dim ReportRenderer As New RenderSQLReports

Dim Parameters() As Reportingservices.ParameterValue = New Reportingservices.ParameterValue(1) {}


Parameters(0) = New Reportingservices.ParameterValue

Parameters(0).Label = "start_date"

Parameters(0).Name = "start_date"

Parameters(0).Value = "10/1/2004 12:00:00 AM"

Parameters(1) = New Reportingservices.ParameterValue

Parameters(1).Label = "end_date"

Parameters(1).Name = "end_date"

Parameters(1).Value = "11/1/2004 12:00:00 AM"



ReportRenderer.RenderReport(Parameters, "/Folder/reportname", "pdffilename.pdf")



LO and behold, it works BUT . now i get this error in the aspx code.

Runtime error has occured.


Microsoft JScript runtime error: 'Report' is undefined

on this weird line:- (that was generated automatically)



</script><script language="javascript" type="text/javascript" src="?rs:Command=Get&amp;rc:GetImage=8.00.1038.00Report.js">

</script><script language="javascript" type="text/javascript">

<!--

function OnLoadReport()

{

var pageHits = null;

var rep = new Report(1, 16, pageHits, false, docMapIds); <-where error is occuring.

if (parent != self) parent.OnLoadReport(rep);

}

//-->

</script>





It did show the report, but I don't understand why it is still getting an error here. Moreover, I didn't even get the HTMLViewer too even when I had assigned the devinfo....



Really need some help here, as this is quite urgent.... I am at a loss at this, and maybe that there is an option that I am not seeing or something I am missing. please help .

Bernard-So close yet so far, How cruel are the software bugs-

View 4 Replies View Related

DTS 'Transform Data Task Property' GUI Window

Apr 15, 2005

I am importing data from xls file to a db table with a dts. In the time of the dts creation I am using 'Transform Data Task Properties' GUI window to map incoming xls fields (source) to the table columns (destination).
Question: Is there any way to invoke the 'Transform Data Task Property' GUI window in dts runtime and use it to change the mapping dynamically in the run time?
Thanks, Vadim.

View 3 Replies View Related

Value Of A Readonly Property Of Custom Task Is Not Updated In Property Window

Apr 17, 2008

Hi,

I developed a simple custom control flow component which has several read/write properties and one readonly property (lets call it ROP) whichs Get method simple returns the value of a private variable (VAR as string). In the Execute method the VAR has a value assigened. When I put the value of ROP or VAR into MsgBox I can see the correct value. However when I execute the component I can not see the value of the ROP in the property window. I see the property but its value is empty string. For example when I put a breakpoint to postexecute or check the property before click OK in a MsgBox I would expect that the property value would be updated in SSIS as well. Is there a way how to display correct values of custom tasks properties in property window?

Thanks for any hints.

View 3 Replies View Related

Data Flow Task

Dec 4, 2007


Hi

I have a data flow task. If it completes I should update a flag in the database. So How I can I know if the

data flow task has completed or not.

Thanks

Sai

View 4 Replies View Related

Which Data Flow Task To Use?

Feb 5, 2007

I have a table which has been loaded from various source feeds. The SourceId relates to the source name and the SourceCompanyId is the sources primary key for the company. I am basically trying to create one row with all the SourceCompanyIds in my column headers. What data flow tasks would be necessary in SSIS?



The structure of the final table is:

CREATE TABLE [dbo].[Company](

[CompanyId] [int] IDENTITY(1,1) NOT NULL,
[CompanyName] [varchar](75),
[CIK] [varchar](10),
[Ticker] [varchar](10),
[Source1CompanyId] [int] NULL,
[Source2CompanyId] [int] NULL,
[Source3CompanyId] [int] NULL,
[Source4CompanyId] [int] NULL,
[Source5CompanyId] [int] NULL,
[Source6CompanyId] [int] NULL,

CONSTRAINT [PK_Company] PRIMARY KEY CLUSTERED

(
[CompanyId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

=================================

The table in which contains all the company data

CREATE TABLE [dbo].[SourceCompany](

[SourceId] [int] NOT NULL,
[SourceCompanyId] [varchar](10) ,
[SourceCompanyName] [varchar](75),
[CIK] [varchar](10),
[Ticker] [varchar](10),

CONSTRAINT [PK_SourceCompany] PRIMARY KEY CLUSTERED

(
[SourceId] ASC,
[SourceCompanyId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY]

View 5 Replies View Related

Expression Issue With Custom Data Flow Component And Custom Property

Apr 2, 2007

Hi,



I'm trying to enable Expression for a custom property in my custom data flow component.

Here is the code I wrote to declare the custom property:



public override void ProvideComponentProperties()

{


ComponentMetaData.RuntimeConnectionCollection.RemoveAll();

RemoveAllInputsOutputsAndCustomProperties();



IDTSCustomProperty90 prop = ComponentMetaData.CustomPropertyCollection.New();

prop.Name = "MyProperty";

prop.Description = "My property description";

prop.Value = string.Empty;

prop.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;



...

}



In design mode, I can assign an expression to my custom property, but it get evaluated in design mode and not in runtime

Here is my expression (a file name based on a date contained in a user variable):



"DB" + (DT_WSTR, 4)YEAR( @[User::varCurrentDate] ) + RIGHT( "0" + (DT_WSTR, 2)MONTH( @[User::varCurrentDate] ), 2 ) + "\" + (DT_WSTR, 4)YEAR( @[User::varCurrentDate] ) + RIGHT( "0" + (DT_WSTR, 2)MONTH( @[User::varCurrentDate] ), 2 ) + ".VER"



@[User::varCurrentDate] is a DateTime variable and is assign to 0 at design time

So the expression is evaluated as: "DB189912189912.VER".



My package contains 2 data flow.

At runtime,

The first one is responsible to set a valid date in @[User::varCurrentDate] variable. (the date is 2007-01-15)

The second one contains my custom data flow component with my custom property that was set to an expression at design time



When my component get executed, my custom property value is still "DB189912189912.VER" and I expected "DB200701200701.VER"



Any idea ?



View 5 Replies View Related

Data Flow Task Error To Extract Data From Sql Server To Excel

Mar 28, 2008

Hi All,

I want to export data from SQL Server2005 to an Excel spreadsheet thru "Data Flow Task". I am using OLE DB for SQL Server for the source connection and a Connection To Excel as my destination source. The Excel spreadsheet (2003) exists and has the first row with column names. I don't have any warnings before trying to execute.

The SQL datable fileds are
i) ID - Int

ii) RefID
iii) txtRemarks - nvarchar(MAX)
iv) ddlWaterLevel - nvarchar(50)

While executing the tasks, I got the error
Error: 0xC0202025 at Data Flow Task, Excel Destination [427]: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
Error: 0xC004701A at Data Flow Task, DTS.Pipeline: component "Excel Destination" (427) failed the pre-execute phase and returned error code 0xC0202025.


After analysing I found in the DataFlow --> Excel destination --> Advanced Editor for Excel Destination, the default data type for txtRemarks shows as "Unicode string [DT_WSTR]". But this is supposed to be "Unicode text stream [DT_NTEXT]". Even if I change the data type in the design time, It doesn't accept.

Please do help me out.

thanks
Sanra

View 4 Replies View Related

How Do I Call A Stored Procedure To Insert Data In SQL Server In SSIS Data Flow Task

Jan 29, 2008



I need to call a stored procedure to insert data into a table in SQL Server from SSIS data flow task.
I am currently trying to use OLe Db Destination, but I am not sure how to map inputs to OLE DB Destination to my stored procedure insert.
Thanks

View 6 Replies View Related

Error At Data Flow Task

Dec 12, 2007

Hi all, I am getting the following when trying to import text coloums from execl to SQL server 2005. Any ideas?

Error at Data Flow Task [Destination] Coloums "blar" and "Blar_name" cannot convert between unicode and non-unicode sting types.

Any help would be great.

Thanks

Dave


Dave Dunckley says there is a law for the rich and a law for the poor and a law for
Dirty Davey.

View 3 Replies View Related

Need Help For Design Data Flow Task

Nov 14, 2007

Hi frns,

I am new to SSIS. I need some help in designing the below dataflow task.


-- Teacher creates several tasks and each task is assigned to multiple students
-- The teacher table contains contains all the tasks created a every teacher
use ods
go
create table teacher
(
yr int,
tid int,
tname varchar(20),
taskid int

)

insert into teacher values(2007,101,'suraj','task1')
insert into teacher values(2007,101,'suraj','task2')
insert into teacher values(2007,102,'bharat','task3')

insert into teacher values(2007,103,'paul','task4')
insert into teacher values(2007,103,'paul','task5')
insert into teacher values(2007,103,'paul','task6')


-- Teacher "suraj" has created 2 tasks
-- Teacher "bharat" has created 1 task

select * from ods..teacher
yr tid tname taskid
============================
2007 101 suraj 1111
2007 101 suraj 1122
2007 102 bharat 2222

-- Students table contains studentid(sid),teacherid(i,e tid ) & taskid
drop table students

create table students
(
yr int,
sid varchar(10),
tid int,
taskid varchar(10)
)

truncate table students

insert into students values(2007,'stud1',101,'task1')
insert into students values(2007,'stud1',101,'task2')

insert into students values(2007,'stud2',101,'task1')
insert into students values(2007,'stud2',101,'task2')

--Note : stud1,stud2 comes under teacher with tid "101"



insert into students values(2007,'stud3',102,'task3')

-- Note : stud3 and stud4 comes under teacher with tid "102"

insert into students values(2007,'stud4',103,'task4')
insert into students values(2007,'stud4',103,'task5')
insert into students values(2007,'stud4',103,'task6')

insert into students values(2007,'stud5',103,'task4')

select * from students
yr sid tid taskid
----------------------------
2007 stud1 101 task1
2007 stud1 101 task2

2007 stud2 101 task1
2007 stud2 101 task2

2007 stud3 102 task3
2007 stud4 103 task4
2007 stud4 103 task5
2007 stud4 103 task6
2007 stud5 103 task4


Now in my target table i need to load the data in a such a way that

use targetdb
go
drop table trg
go

create table trg
(
yr int, -- data should load from teacher.yr
tid int,
taskid int(20),
cnt int

)

Mapping in target column and value to be loaded
==================================================
yr -- teacher.yr
tid -- teacher.id
taskid -- this need to start a new sequence of numbers starting from 1 for each teacher and dont want the task id to be copied as it is.
cntofstudents -- need to count no of students from "students" table for a given teacher and for his assignment

For example for teacherid "101" and taskid "task1" there are 2 students
again for the same teacher "101" and taskid "task2" there are 2 students


For teacher "102" and taskid "task3" there is only 1 student

Similary for teacher "103"


Relation
========

Teacher table | Students Table
yr | yr
tid | tid


After i run the ETL the data should look as follows :

insert into trg values(2007,101,1,2)
insert into trg values(2007,101,2,2)

insert into trg values(2007,102,1,1)

insert into trg values(2007,103,1,2) -- task4 is created by teacher "103" and assigned to 2 students stud4 and stud5
insert into trg values(2007,103,2,1) -- task5 is created by teacher "103" and assigned to 1 student i.e stud4
insert into trg values(2007,103,3,1) -- task6 is created by teacher "103" and assigned to 1 student i.e stud5

Note : If u observer the values in 3rd column of the trg table, instead of directly mapping the taskid we need to generate a separate sequence for every teacher.

BottomLine : for each and every task created by each teacher there should be a unique record along with the count of students in "STUDENTS" table


Can anyone help me out in designing the Data Flow task for this Functionality.



Thanks,
Manu

View 10 Replies View Related

Data Flow Task Question

May 24, 2007

Hi there. I'm trying to learn SSIS, please, help me. I have 2 questions:

1)
There are 2 databases on 2 different servers. I need to get data from Table1(database1) and put it to Table2(database2). But I have to insert rows, which ID is not exists in Table2. How Can I do necessary filter?

2)
In the OLE DB DataSource Component I have used SQL Command(it's simplified):

declare @TmpTable TABLE (WorkCode int not null);

INSERT INTO @TmpTable (WorkCode)
select WorkCode
from Table1

SELECT WorkCode
FROM @TmpTable

SSIS Package works without any exception. But there is no any inserted record in destination table. If I try similar query without temporary table - it works good. Why?

View 7 Replies View Related

Data Flow Task Error

Jan 7, 2008

Hi,

I have SQL Server 2005 Express edition on my machine. On an SSIS project in BIDS, when i drag a "Data Flow Task" to the package it returns the following error:

The designer could not be initialized. (Microsoft.DataTransformationServices.Design)

Does this has anything to do with the fact that i don't have SSIS installed on my machine?

I thought that SSIS was only needed (on my machine) for the runtime, just to run the packages. To create and edit the pachages i need to install SSIS on my machine too? this doesn't makes sense, maybe it's another problem.

Can anyone help me on this?

Thank you,
Rafael Augusto

View 10 Replies View Related

Error With Data Flow Task

Jul 3, 2007

I am having problems with the Data Flow task. It does not even show up in the list of items to drop into the SSIS project.

If I go to the Data Flow tab and hit create, I get the follow error. I have tried repairing and reinstalling, but nothing seems to clear up the error. Without rebuilding my machine, is there anyone who knows how to get the Data Flow Task reinstalled properly?

Thanks

Wayne

TITLE: Microsoft Visual Studio------------------------------Registration information about the Data Flow task could not be retrieved. Confirm that this task is installed properly on the computer. ------------------------------ADDITIONAL INFORMATION:TaskHost "{C3BF9DC1-4715-4694-936F-D3CFDA9E42C5}"' is not installed correctly on this computer. (Microsoft.DataTransformationServices.Design)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.762&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=TaskHostNotInstalled&LinkId=20476------------------------------BUTTONS:OK------------------------------

View 1 Replies View Related

Data Flow Task Stuck

Jul 12, 2007

I have a simple data flow task setup...
2 ADO.NET connection managers, each referencing a DSN pointed to a Unidata database.
2 DataReader sources, each using a single ADO.NET connection managers, running a simple SELECT statement from a table.
I have a Union All transform setup to merge the data and write to a OLE DB Destination (SQL05 database)

When I run the package, each source will validate, but only one will execute. The other source will do nothing. The data source will be colored yellow, and will just sit there. The package will just sit, almost like it is waiting for input.

This behavior is not consistent, however. It varies which data source will hang, pretty much 50-50. About 25% of the time, both sources will execute, and all rows will be written to the destination.

Any help is appreciated.

thanks

View 9 Replies View Related

Data Flow Task Problem

Dec 8, 2005

I have a Windows XP X64 machine with SQL 2005 Developer and VS 2005 Team Edition for Architects on it. For the most part it appears that all normal VS and SQL functions are working properly with the exception of SSIS. If I open the developer studio and drag a Data Flow Task onto the design surface I get the message below. I have tried doing an unistall and reinstall of Integration Services as well as a repair on VS 2005 with no success. I've searched the web and newsgroups and can't find any mention of the problem I'm having. Any help greatly appreciated.

View 18 Replies View Related

Two Destinations In A Data Flow Task

Aug 13, 2007

Hi All,

I wanna know if we can have more than one "OLEDB Destination" within a Data Flow Task, I want to use the same data flow and write to two different tables in a database with some changes. If we cannot do this within the same data flow what is the best way to do this.

Thanks

View 3 Replies View Related

How To Debug Data Flow Task?

Nov 6, 2007

How can I debug data flow task. From this article (http://www.databasejournal.com/features/mssql/article.php/3567961) and this video (http://www.jumpstarttv.com/Media.aspx?vid=3) I found that when we are executing the task, the data count will be shown along with color coded task but when I debug the package, no count is shown. I have SQL and source and flat file as destination. There is nothing stored in the destination file but the sql script returns the data.

Thanks.

View 6 Replies View Related

SSIS Ate My Data Flow Task!

Sep 7, 2007

I was working all day making changes to my 3MB package. I was adding a large number of transforms that were copied-and-pasted from elsewhere in the same data flow task.

All was going well. I even took the time to have SSIS lay out the task again (1/2 hour). Suddenly I started receiving some strange errors:



After the layout, I noticed two stray components 'way off in the upper right corner. I found that one of them had a duplicate name to a component which had been added hours ago. Even after deleting it, I got "duplicate name" errors.

I copied three components in one selection, and when I tried to paste them, got the error "can't initialize component on paste". I tried them one at a time, but got the same error.

I got errors about COM failures due to marshalling to another thread
I then exited Visual Studio and started it again. To my great surprise, the data flow task I was working on was still there, but was completely empty.

Comparing what I'm left with to my last version in source control, I find that the entire pipeline element is missing from the DTS: ObjectData element!

I'm developing a real love/hate relationship with SSIS. It varies from one day to the next. Guess what kind of day this is!

View 3 Replies View Related

ERROR AT DATA FLOW TASK

Oct 17, 2006

HI, I HAVE A NEW PROBLEM...HOPE SOMEONE KNOWS WHAT THE $#%#$ IS HAPPENING. HERE IT´S THE THING: I´M USING A DATA FLOW TASK TO READ DATA FROM AN ORACLE SERVER AND  TRANSFER THE INFO TO MY SQL 2005 SERVER, THE SOURCE IS AVAILABLE  AND THE CONNECTION IS WORKING, I'M USING A DATA READER SOURCE TO CONNECT AND EXTRACT.  I´VE PUT THIS DTS IN A JOB AND IT WAS OK, IT HAD BEEN RUNNING OK FOR ALMOST A MONTH BUT SUDDENLY HIS MORNING IT FAILED WITH THE FOLLOWING ERROR:

SSIS package "SAZSIE_CargaVentasSeguros (1).dtsx" starting.

Information: 0x4004300A at Extrae SAZ_GranoO_New, DTS.Pipeline: Validation phase is beginning.

Information: 0x4004300A at Extrae SAZ_GranoO_New, DTS.Pipeline: Validation phase is beginning.

Information: 0x40043006 at Extrae SAZ_GranoO_New, DTS.Pipeline: Prepare for Execute phase is beginning.

Information: 0x40043007 at Extrae SAZ_GranoO_New, DTS.Pipeline: Pre-Execute phase is beginning.

Information: 0x4004300C at Extrae SAZ_GranoO_New, DTS.Pipeline: Execute phase is beginning.

Error: 0xC0047062 at Extrae SAZ_GranoO_New, SAZ_GranoONew [421]: System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)

at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket)

Error: 0xC0047038 at Extrae SAZ_GranoO_New, DTS.Pipeline: The PrimeOutput method on component "SAZ_GranoONew" (421) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.

Error: 0xC0047021 at Extrae SAZ_GranoO_New, DTS.Pipeline: Thread "SourceThread0" has exited with error code 0xC0047038.

Information: 0x402090DF at Extrae SAZ_GranoO_New, OLE DB Destination [1022]: The final commit for the data insertion has started.

Information: 0x402090E0 at Extrae SAZ_GranoO_New, OLE DB Destination [1022]: The final commit for the data insertion has ended.

Information: 0x40043008 at Extrae SAZ_GranoO_New, DTS.Pipeline: Post Execute phase is beginning.

Information: 0x40043009 at Extrae SAZ_GranoO_New, DTS.Pipeline: Cleanup phase is beginning.

Information: 0x4004300B at Extrae SAZ_GranoO_New, DTS.Pipeline: "component "OLE DB Destination" (1022)" wrote 19522 rows.

Task failed: Extrae SAZ_GranoO_New

Warning: 0x80019002 at SAZSIE_CargaVentasSeguros: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

SSIS package "SAZSIE_CargaVentasSeguros (1).dtsx" finished: Failure.

 

THE DATA HAS BEEN COPIED INTO MY DESTINATION TABLE, BUT THE PACKAGE ENDS IN AN ERROR, WHAT IS THE PROBLEM WITH THIS???

PLASE SOMEONE !!!!

THANKS!!!!!!!

View 8 Replies View Related

Data Flow Task SQL Strings

Jan 11, 2006

Hi,

I just wanna ask:

I'm creating an SSIS package, a Data Flow Task. I have used OLEDB Source connected to a SQL Server Destination. Now in my OLEDB Source, I have this SQL statement

SELECT FirstName, LastName, Age FROM Employees WHERE (Age > 10) AND (Age < 95)

But what I want is to have the last name and first name concatenated and in proper case(capitalize first letter of the firstname and surname). I also want to TRIM or remove the blank spaces of the field in my SQL statement. How I be able to do this? 

I tried using proper(), trim() and ucase() like in MSAccess but no success.

Please help. Thanks in advance.

 

View 2 Replies View Related

Data Unexpectedly Changing In Data Flow Task

Oct 3, 2007

I have a fairly simple data flow task that loads data from one table (OLE DB Source) into another table (OLE DB Destination). The data type for one of the pairs of columns is nVarChar(120) and it contains version information that looks like a decimal. When I run the export, the destination has a trailing zero added after the decimal point as if it were a numeric column which invalidates our comparisons (string 1.0 is not the same as string 1.00). There is no cast or convert done to this column, it is a straight copy. Any ideas what could be causing this or how to fix?

View 6 Replies View Related

One Data Flow Task And Multiple Data Flows

Jul 26, 2007

I have a data flow task which has around 5 data flows (like the 2nd diagram shown here). These 5 simple flows with just a row count transformation in between. Now, I want to fail the entire task immediately even if one of the data flows failed. Right now if one flow fails the remaining flows fails after a long time, not immediately. How can I make it fails immediately.

The other I would like to do is Can I place these 5 data flows in a transaction, so that if one data flow fails, others data flows also roll backs? ( I assume its not possible)

Thanks

View 1 Replies View Related

One To Many Column Mapping In Data Flow Task

Sep 27, 2007



Hi,
Is there a way to accomplish one- many or many -one or many - many column mappings in the SSIS data flow task or using any other tasks. We were able to do this in DTS Transform data task. Also is it possible to edit the mapping like:
dest column1 = Right(dest column1, 3)

Thanks.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved