SSIS Date Mapping

May 25, 2007

I'm creating a DTSX that will load flat file data into a table. Pretty easy, eh? Not with dates and times ...



The column in the destination table is a datetime data-type.

The date format in the source flat file is "m/d/yyyy" ("5/27/2007"). I know it doesn't have a time portion, long story!



When I create the package and transform the flat file data into the SQL Server Destination, the table column returns as a timestamp datatype. Moreover, there's no mechanism (that I've found) to force the destination datatype to datetime. There's DB Date, DB Time, FileTime, etc ... but no plain-old datetime.



Any help? An answer? An online resource? A book?



Thanks a mill'

Michael

View 21 Replies


ADVERTISEMENT

SSIS Parameter Mapping With Oracle Data Type Mapping!

Mar 19, 2008

Hi Friends,

I have a small problem in parameter mapping for Execute SQL Task.
I am using a delete statement with 2 conditions.
Followed by another Execute SQL Task which contains commit statement.

delete from tname where c1 = ? and c2 =?

where c1 is number(4) datatype and c2 is of varchar2(20) datatype in oracle.


The connection manager i am using is ORacle OLE DB provider.
I am passing 2 global variables i.e g_v1 of Int32 and g_v2 of String Type.

In the parameter mapping of the Executing SQL task, i am mapping these 2 variables for
c1 and c2 and changed the datatypes inside parameter mapping as Numeric for c1 and Varchar for c2.

I also set the property as ByPassPrepare = True.

When i am executing the package i getting INVALID NUMBER ERROR.
i believe the SSIS is unable to perform the implict datatype converison.

For the next run, i changed the g_v1 varible datatype to Double and also i changed the parameter mapping for c1 as Doble datatype.
This time it is working fine. I can see the Green signal for the 2 SQL Tasks.

But when i connected to Oracle check the count in the table, the data is not getting deleted.

Also,
I set the property RetainSameConnection = TRUE for oracle connection manager.
I am not able to trace this logical error.

The same is working fine in my local machine.
But i am facing the problem when i deployed the same on the client machine.


Is there any problem with parameter mapping?
What should be equialent Datatype for Oracle NUMBER datatype that should be used inside the SSIS package while declaring the global variable and
inside the parameter mapping.

Any thoughts!

View 5 Replies View Related

Dynamic Mapping In SSIS

May 8, 2008

Dears

I am trying to to make a dynamic column mapping using the SSIS, the mapping will be stored in a seperate table, and based on the file name, the necessary mapping will be applied.

Please advise its possibility.

View 10 Replies View Related

SSIS Parameter Mapping ?

Jan 29, 2008

Hi
I have migrated a DTS 2000 package to an SSIS package.

Half of it works fine, when stored procedures are called that don't use parameters they work fine on SSIS.

However when a SP is called with a parameter it can't find the parameter name ?

I have mapped the parameter under "parameter mappings" , the parameter is a simple date value
which is created at the beginning of the SSIS package in a SQL task.

it is saved as a global variable , and i have mapped this as the parameter , yet it still can't find the param. name ?

any sugestions ?

View 1 Replies View Related

Column Mapping In SSIS

Dec 21, 2006

Hi,

My Destination columns are more than source columns....

So, how to do column mapping if my source and destination columns are different?

Thanx,

Ruja

View 4 Replies View Related

Oracle Parameter Mapping In SSIS !

Mar 19, 2008

Hi pals,

I have a small problem in parameter mapping for Execute SQL Task.
I am using a delete statement with 2 conditions.
Followed by another Execute SQL Task which contains commit statement.

delete from tname where c1 = ? and c2 =?

where c1 is number(4) datatype and c2 is of varchar2(20) datatype in oracle.


The connection manager i am using is ORacle OLE DB provider.
I am passing 2 global variables i.e g_v1 of Int32 and g_v2 of String Type.

In the parameter mapping of the Executing SQL task, i am mapping these 2 variables for
c1 and c2 and changed the datatypes inside parameter mapping as Numeric for c1 and Varchar for c2.

I also set the property as ByPassPrepare = True.

When i am executing the package i getting INVALID NUMBER ERROR.
i believe the SSIS is unable to perform the implict datatype converison.

For the next run, i changed the g_v1 varible datatype to Double and also i changed the parameter mapping for c1 as Doble datatype.
This time it is working fine. I can see the Green signal for the 2 SQL Tasks.

But when i connected to Oracle check the count in the table, the data is not getting deleted.

Also,
I set the property RetainSameConnection = TRUE for oracle connection manager.
I am not able to trace this logical error.

The same is working fine in my local machine.
But i am facing the problem when i deployed the same on the client machine.


Is there any problem with parameter mapping?
What should be equialent Datatype for Oracle NUMBER datatype that should be used inside the SSIS package while declaring the global variable and
inside the parameter mapping.

Is there any way to see/look the sql statement which is formed after Parameter Subsititution inside the log file?
Can we print the SQL Statement Formed by the Execute SQL task inside a script task ?


Any help would be greatly appreciated !
Thanks in advance

View 1 Replies View Related

Column Mapping Diagram In SSIS

Jan 28, 2008


Hi all,

I am transferring a huge Database running on PostgreSQL to SQL SERVER using SSIS. I have already mapped all the columns between source and target tables. Is it possible in SSIS to get a graphical diagram showing all the source and targets tables and its mapping?

Thanks in Advance,

View 3 Replies View Related

SSIS SQL OLE DB Source - SQL Command Vs Mapping

Oct 10, 2007

I created a Stored Proc to compute all the data I need to export to a CSV file.
I use the provider MS OLE DB Provider for SQL Server.
It's a very simple package with a single Data Flow Task.
This flow task is using an OLE DB Source to call a simple SQL Command : Exec MyStoredProc.
There are no params.

This Stored Proc is using table variables to compute the data.
It takes about 10 seconds to return anything.
The problem is that the mapping doesn't work with the OLE DB Source.
There are no fields at all shown in the mapping screen.

I tried to replace the Stored Proc by a version which only returns fields and no data.
Then the mapping would work just fine.
The package is then compiling and working fine.
But everytime I put back the real stored proc, even without changing the SQL Command, the SSIS execution breaks at execution.
It keeps saying :

"Error: 0xC0202005 at Data Flow Task, OLE DB Source [477]: Column "RecordType" cannot be found at the datasource."

My guess is that SSIS doesn't wait the 10 secs and thinks the Stored Proc is not returning anything.
What can I do to make this work ?


Thanks,

Vincent

View 3 Replies View Related

SSIS Conditional Column Mapping

Aug 3, 2007




I have a condition where if column5 is equal to 1 then put column6 into the destination column "dest6", if it is not equal to 1 then put column6 in destination column "dest7"

What is the best way to do this in SSIS?

If I have to use the conditional split then do I have to copy my complete mappings, exact change this one column?

Thank for the help this mapping will take me a long time!

View 5 Replies View Related

SQL 2012 :: SSIS - Dynamic Column Mapping

Jul 16, 2014

I am new to SSIS and i got 1 assignment.

Requirement:

In my destination table i am having some 30 columns and the CSV files what i get may have 10 columns or 20. How do I map columns between source and destination dynamically?

View 3 Replies View Related

SSIS Mapping Columns From Flat Files

Jan 4, 2008

I had to use use ssis 2005 in a short project recently & had littletime to work it out. I was importing a whole bunch of flat files intoSQL Server tables with many derived columns and transformations inbetween.It seems to automatically map columns from the flat file to columns inthe sql table where the names of the columns are equal. But can italso do it automatically on position, so flat file column 1 goes tosql table colum 1, etc, etc? In each flat file I had to manually clickand drag the columns across to map them which took a very long time asthere were hundreds of columns in some tables!Thanks.

View 3 Replies View Related

SSIS Data Cleansing Mapping Problem

Apr 18, 2007

I am just starting out with SSIS and trying to get the feel of data cleansing using it. But on my very first project for data cleansing I've got into this weird error.



My data flow is very simple, it has a OLE DB source, Fuzzy Lookup and OLE DB destination. I've built three tables for this purpose, one is source, one is reference (it will be used to match for the real entries in fuzzy lookup) and the last is the destination table.



In all the three tables I've a field of City which I'd like to Fuzzy lookup in the reference table and if it crosses certain confidence level, I'd like to insert to the destination table. City in all the tables has the same datatype, defined in the same way, it is varchar(50).



But when in the fuzzy lookup I try to map the Source tables City field to reference tables City field, it gives me this error:



The following columns cannot be mapped:

[City, CityRef]

One or more columns do not have supported data types, or their data types do not match.



Although as I have mentioned before, both have same data types and are defined in the same manner (i.e. I've just selected the datatypes for those columns and all the other settings are left to default). I just cannot understand why this is happening, plz help me with this. FYI I've also tried to give the City Column different datatypes in all the tables like varchar(max), text, Only to be greeted with the same error message.



Waiting for your reply!!

Regards,

Sajid.

View 6 Replies View Related

SSIS OLE DB Connection Keeps Loosing Mapping Of Last 4 Fields

Nov 2, 2007

I have a script and on one of the tables I keep loosing the mapping of the last 4 fields. If I go into the task it will ask me if I want it to automatically fix it and I say yes and remap fields but when I run it it bombs and comes back and when I go back into it it tells me there is a problem with same fields. It also rearanges the order and puts these fields last.

I have tried deleting and redoing the transformation only to have the same thing happen. Almost seems like a bug in software. I have seen this before but usually when I fix it it does not return.

View 5 Replies View Related

SSIS Tries To Insert NULL Value Into A Destination Column Ignored In The Mapping.

Jan 12, 2008

Hello everyone,

I am having a little problem with a simple package and I do not know if this is a known issue or that I am missing something.

I have a data flow task, a simple one, with an oledb source pulling data, using a select statement, from a sql server 2005 instance, and an ole db destination pointing to a table in a sql server 2000 instance. Both intances are standard edition. The table in the destination has a column which allow null values and has also a default constraint (getdate()), and this column is not present in the source. When I map the columns in the destination, I leave this column as "ignore", not being mapped to any column from the source. The problem is that when I execute the task, SSIS is trying to insert NULL value into this column, so the package fail with the error "can not insert NULL value into column myColumn". I wonder why is it trying to insert NULL value if the column is not mapped to any column from the source.

Is this a known issue or I am nissing something in the settings?

If the destination table has rowversion or identity columns, there is no problem ar all. I ignore those columns in the mapping and SQL Server feeds them as expected.

Thanks in advance,
Alejandro Mesa

View 19 Replies View Related

SSIS - Excel Destination Column Mapping Error

Jun 25, 2007

I have created a package which transfers data from a SQL server source to an Excel Destination. The DataFlow Task works fine , if i pre-define the column names in the Excel Destination... But i run into an error when i give the blank excel sheet as my destination. I am unable to map any columns



A sample example is as shown above .. In the column mappings field only one column in the Excel shows up for mapping and eventually throws the error "[Excel Destination [42]] Error: The number of columns is incorrect. "



How do we proceed in this case , where in we do not want to give pre-defined coulmn names in the Excel Destination sheet.



Thanks,
D

View 4 Replies View Related

Integration Services :: Dynamic Column Mapping In SSIS Package

Nov 2, 2015

I have some source files is there today it will have 4 columns..Tomorrow it will have 10 columns...my package is dynamically load the data to destination table..How we have do it in Using script task...

View 4 Replies View Related

Integration Services :: SSIS 2008 R2 - Add Columns To Existing Mapping With Destination DB Table

Sep 8, 2015

The only way to add a new column to an existing mapping that I know is to go to advanced editor and refresh. This however keeps only the default mapping (where the field names match), the rest is wiped out, so need to restore the mapping manually after that. Risky and annoying at the same time. Is there any alternative?

View 3 Replies View Related

Mapping Surrogate Keys Of Level 2 Dimensions To Fact Table In SSIS Data Flow

Aug 16, 2007



Hi,
I use lookups to map surrogate of level 1 dimensions to my fact tables in SSIS.
But how to handle a level 2 dimension with a ValidFrom and a ValidUntil date field?
I do not use an IsCurrent column, because this could problem with late arriving facts.


- In dts I used an SQL statement like this:

update SA
SET SA.DimProdRef = Dim.RecordID
FROM SAWarenEingang SA, DimProd Dim
where SA.ProduktNumber = Dim.ProduktNumber
and SA.ArtikelkontoBewegungsdatum between Dim.ValidFrom and Dim.ValidUntil


Now in SSIS I want to handle the whole thing in the data flow without using a staging table:
- Using Lookups: I would have to pass the date column for each inside the fact table into the lookup. That does not work.
- Using Execute SQL in the data flow: would be very slow, because the statement will be executed for any line in the dataflow


Any ideas?


Best regards,
Stefoon

View 10 Replies View Related

SSIS: Problem Mapping Global Variables To Stored Procedure. Can't Pass One Variable To Sp And Return Another Variable From Sp.

Feb 27, 2008

I'm new to SSIS, but have been programming in SQL and ASP.Net for several years. In Visual Studio 2005 Team Edition I've created an SSIS that imports data from a flat file into the database. The original process worked, but did not check the creation date of the import file. I've been asked to add logic that will check that date and verify that it's more recent than a value stored in the database before the import process executes.

Here are the task steps.


[Execute SQL Task] - Run a stored procedure that checks to see if the import is running. If so, stop execution. Otherwise, proceed to the next step.

[Execute SQL Task] - Log an entry to a table indicating that the import has started.

[Script Task] - Get the create date for the current flat file via the reference provided in the file connection manager. Assign that date to a global value (FileCreateDate) and pass it to the next step. This works.

[Execute SQL Task] - Compare this file date with the last file create date in the database. This is where the process breaks. This step depends on 2 variables defined at a global level. The first is FileCreateDate, which gets set in step 3. The second is a global variable named IsNewFile. That variable needs to be set in this step based on what the stored procedure this step calls finds out on the database. Precedence constraints direct behavior to the next proper node according to the TRUE/FALSE setting of IsNewFile.


If IsNewFile is FALSE, direct the process to a step that enters a log entry to a table and conclude execution of the SSIS.

If IsNewFile is TRUE, proceed with the import. There are 5 other subsequent steps that follow this decision, but since those work they are not relevant to this post.
Here is the stored procedure that Step 4 is calling. You can see that I experimented with using and not using the OUTPUT option. I really don't care if it returns the value as an OUTPUT or as a field in a recordset. All I care about is getting that value back from the stored procedure so this node in the decision tree can point the flow in the correct direction.


CREATE PROCEDURE [dbo].[p_CheckImportFileCreateDate]

/*

The SSIS package passes the FileCreateDate parameter to this procedure, which then compares that parameter with the date saved in tbl_ImportFileCreateDate.

If the date is newer (or if there is no date), it updates the field in that table and returns a TRUE IsNewFile bit value in a recordset.

Otherwise it returns a FALSE value in the IsNewFile column.

Example:

exec p_CheckImportFileCreateDate 'GL Account Import', '2/27/2008 9:24 AM', 0

*/

@ProcessName varchar(50)

, @FileCreateDate datetime

, @IsNewFile bit OUTPUT

AS

SET NOCOUNT ON

--DECLARE @IsNewFile bit

DECLARE @CreateDateInTable datetime

SELECT @CreateDateInTable = FileCreateDate FROM tbl_ImportFileCreateDate WHERE ProcessName = @ProcessName

IF EXISTS (SELECT ProcessName FROM tbl_ImportFileCreateDate WHERE ProcessName = @ProcessName)

BEGIN

-- The process exists in tbl_ImportFileCreateDate. Compare the create dates.

IF (@FileCreateDate > @CreateDateInTable)

BEGIN

-- This is a newer file date. Update the table and set @IsNewFile to TRUE.

UPDATE tbl_ImportFileCreateDate

SET FileCreateDate = @FileCreateDate

WHERE ProcessName = @ProcessName

SET @IsNewFile = 1

END

ELSE

BEGIN

-- The file date is the same or older.

SET @IsNewFile = 0

END

END

ELSE

BEGIN

-- This is a new process for tbl_ImportFileCreateDate. Add a record to that table and set @IsNewFile to TRUE.

INSERT INTO tbl_ImportFileCreateDate (ProcessName, FileCreateDate)

VALUES (@ProcessName, @FileCreateDate)

SET @IsNewFile = 1

END

SELECT @IsNewFile

The relevant Global Variables in the package are defined as follows:
Name : Scope : Date Type : Value
FileCreateDate : (Package Name) : DateType : 1/1/2000
IsNewFile : (Package Name) : Boolean : False

Setting the properties in the "Execute SQL Task Editor" has been the difficult part of this. Here are the settings.

General
Name = Compare Last File Create Date
Description = Compares the create date of the current file with a value in tbl_ImportFileCreateDate.
TimeOut = 0
CodePage = 1252
ResultSet = None
ConnectionType = OLE DB
Connection = MyServerDataBase
SQLSourceType = Direct input
IsQueryStoredProcedure = False
BypassPrepare = True

I tried several SQL statements, suspecting it's a syntax issue. All of these failed, but with different error messages. These are the 2 most recent attempts based on posts I was able to locate.
SQLStatement = exec ? = dbo.p_CheckImportFileCreateDate 'GL Account Import', ?, ? output
SQLStatement = exec p_CheckImportFileCreateDate 'GL Account Import', ?, ? output

Parameter Mapping
Variable Name = User::FileCreateDate, Direction = Input, DataType = DATE, Parameter Name = 0, Parameter Size = -1
Variable Name = User::IsNewFile, Direction = Output, DataType = BYTE, Parameter Name = 1, Parameter Size = -1

Result Set is empty.
Expressions is empty.

When I run this in debug mode with this SQL statement ...
exec ? = dbo.p_CheckImportFileCreateDate 'GL Account Import', ?, ? output
... the following error message appears.

SSIS package "MyPackage.dtsx" starting.
Information: 0x4004300A at Import data from flat file to tbl_GLImport, DTS.Pipeline: Validation phase is beginning.

Error: 0xC002F210 at Compare Last File Create Date, Execute SQL Task: Executing the query "exec ? = dbo.p_CheckImportFileCreateDate 'GL Account Import', ?, ? output" failed with the following error: "No value given for one or more required parameters.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Task failed: Compare Last File Create Date

Warning: 0x80019002 at GLImport: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) 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 "MyPackage.dtsx" finished: Failure.

When the above is run tbl_ImportFileCreateDate does not get updated, so it's failing at some point when calling the procedure.

When I run this in debug mode with this SQL statement ...
exec p_CheckImportFileCreateDate 'GL Account Import', ?, ? output
... the tbl_ImportFileCreateDate table gets updated. So I know that data piece is working, but then it fails with the following message.

SSIS package "MyPackage.dtsx" starting.
Information: 0x4004300A at Import data from flat file to tbl_GLImport, DTS.Pipeline: Validation phase is beginning.

Error: 0xC001F009 at GLImport: The type of the value being assigned to variable "User::IsNewFile" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.

Error: 0xC002F210 at Compare Last File Create Date, Execute SQL Task: Executing the query "exec p_CheckImportFileCreateDate 'GL Account Import', ?, ? output" failed with the following error: "The type of the value being assigned to variable "User::IsNewFile" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.
". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Compare Last File Create Date

Warning: 0x80019002 at GLImport: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. 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 "MyPackage.dtsx" finished: Failure.

The IsNewFile global variable is scoped at the package level and has a Boolean data type, and the Output parameter in the stored procedure is defined as a Bit. So what gives?

The "Possible Failure Reasons" message is so generic that it's been useless to me. And I've been unable to find any examples online that explain how to do what I'm attempting. This would seem to be a very common task. My suspicion is that one or more of the settings in that Execute SQL Task node is bad. Or that there is some cryptic, undocumented reason that this is failing.

Thanks for your help.

View 5 Replies View Related

Integration Services :: How To Load Multiple Date Format Column Date Into Table Using SSIS

Jun 15, 2015

i have a excel file in which i have a date column it having the below date formats below 

Install Date

20140721

31.07.2014

07.04.2015

20150108

20140811

20150216

7/21/2014

11.08.2014

07.08.2014

So using SSIS how we would load this date column into the table into one format like dd/mm/yyyy or any single date format

View 6 Replies View Related

Conversion Of Oracle Date Time To Sql Server Date Time In SSIS

Jun 30, 2007

This is driving me nuts..



I'm trying to extract some data from a table in oracle. The oracle table stores date and time seperately in 2 different columns. I need to merge these two columns and import to sql server database.



I'm struggling with this for a quite a while and I'm not able to get it working.



I tried the oracle query something like this,

SELECT
(TO_CHAR(ASOFDATE,'YYYYMMDD')||' '||TO_CHAR(ASOFTIME,'HH24:MM : SS')||':000') AS ASOFDATE

FROM TBLA

this gives me an output of 20070511 23:06:30:000



the space in MM : SS is intentional here, since without that space it appread as smiley



I'm trying to map this to datetime field in sql server 2005. It keeps failing with this error

The value could not be converted because of a potential loss of data



I'm struck with error for hours now. Any pointers would be helpful.



Thanks

View 3 Replies View Related

SSIS And Load Date

Oct 3, 2007

I have an SSIS package that imports data. It's working fine except I've been told that the Load_Date field needs to have the same date for each record in the table (the table gets truncated and then loaded each time the SSIS package runs). I created the table with a default of getdate() for Load_Date but I've been told not to do it that way and to have a variable in SSIS to populate Load_Date to make sure it's the same for every record. I've set up a variable in SSIS. I made it a datetime type of variable. It defaults the value to the current date (at that time) but doesn't let me change it to getdate(). I think the way to use the variable is to have a derived columns step that uses the variable Load_Date and then in mappings, set the column equal to the variable. But how do I set the variable equal to getdate() so it can be used for each row?

Thanks

View 2 Replies View Related

Date Conversion In SSIS ETL

Mar 25, 2007

I have date in Flat file and it is in the string format,but now i want to convert it in to normal date format.I have tried doing this by SSIS but it is not working.

View 12 Replies View Related

Date Lookup In SSIS

Nov 14, 2006

How do I perform a date lookup in SSIS. I have a date with time component in it. This has to be looked-up with a table that contains only a date element.

View 6 Replies View Related

Can Any One Tell Me How To Put DD In Date? SSIS Related

May 5, 2008



Hello all, I have a colum yymm in source. in target the format is mmddyy.

dd is always the last day of the month.

can anyone tell me how to get the last day dd date of month always for each yymm

thanks

View 9 Replies View Related

Date Formats In SSIS

Dec 1, 2006

Hi once again guys,

I seem to be struggling with everything in SSIS these days!

I have a datetime field and I want to convert it to the following format in my derived column component :

yyyy.mm.dd

I also have another datetime field but this time I am only interested in the time values and I want to get :



HH:MM

How do I go about doing this in the SSIS expression builder?



Please help.

View 14 Replies View Related

Converting String To Date In SSIS

Jan 29, 2007

I am very new to SSIS though I have written hundreds of SQL 2000 dts' with all kinds of active scripts doing all kinds of things. I am now trying to convert them to SSIS and since scripts don't come through the migrator I am doing them by hand once again. I have the package created, but one of the input fields on the text file is YYYYMMDD , but the database field it is going into is a datetime so I need to convert it to a valid date format so that the conversion will take place. I tried data conversion task but that doesn't work, now I'm assuming I need to use the derived column, but not sure and don't have a clue how to use that, can anyone help? Thanks bostonrose

View 2 Replies View Related

Date Formation In SSIS (DTS)packages.....!

Dec 6, 2007

Hi All,

I am using DTS designer in SSIS (imported packages form DTS version).

I am using VBScript to format dates from (YYYYMMDD) format to (mm/dd/yy) format and then sends to sql table from TXT file.

Input to TXT file has no validation in system. they can either put date sometime in format (MM-DD-YY) or (M-M-DDY-Y) or any other formate and characters.
how would I handle such input.

Thanks,

View 3 Replies View Related

SSIS Package Modified Date

Aug 23, 2007

Hi,

Is there a way to find out when an SSIS package was modified?

Thanks,
Siva.

View 6 Replies View Related

Filtering Most Recent Date Using Ssis

Nov 5, 2007



Hi I have a issue here where i have to store a record from a flat file into Sql Server Table.

The criteria is that there are records in flatfile having same business key but different transaction dates.

I have to place only htose records into the table which are having recent or greater transaction date .

example

name age date
xyx 34 00000000
xyx 34 20071103
xyx 34 20071031


key age and Name

ihave to pick only one record with greater o recent date from 3.


What approach should i take.

Some of the Business keys conssit of 2 or 3 columns .

I have to insert or store only the recent Date consisting records. how do i acheive this please help me.

View 13 Replies View Related

Need To Get The Last Processed Cube Date In SSIS

Apr 15, 2008



Hi All,

I have a scenerio where i need to run the scheduled package for every 10 minutes. Let me give some examples. Say once my ETL process is done, my SS_Batch table gets inserted once. Here i have two columns like SS_Batch_cd and SS_Create_TS respectively. Once the ETL process runs successfully this SS_Batch_CD column will have values as 'C' which means 'Completed'. Similarly when ETL process fails this SS_Batch_CD column will have values as 'F' which means 'Failed'. And Similary when ETL process is in progress this SS_Batch_CD column will have values as 'P' which means it is in 'Progress'. In SS_Create_TS column, it will have date like 2008-04-15'.

Note : This SS_Batch table will get inserted only once when ETL job is over (whether the job is runned sucessfully or not or in Progress) along with the date.

Actually i need to run the package for every 10 minutes because i dont know when the last cube was processed. If i get this last processed cube date then i can check this processed cube date with SS_Create_TS column and SS_Batch_cd in SS_Batch table. Say if Last processed cube date is greater than SS_Create_TS then i can refresh or process the cube. This validation i need to do to achieve my goal.

What are all the control flows should we need to have in SSIS to achieve this scenerio? Please give me briefly to solve this problem.

Please advise on this.

Thanks in advance.
Anand Rajagopal.

View 4 Replies View Related

Conversion From String To Date In SSIS

Apr 1, 2008



I have been trying to read a flat file which has a birthdate field. The field is string and the format is "011594". I have been trying to convert it to a date field in the following format "01/15/1994". Using the forum I was able to write the following expression but I am still keep getting error messages.

I also noticed few records are missing birthdate and few do not have the complete birthdate which means some birthdates are missing year and some are missing month. For example, some are completely missing and some are partially missing, like " " or "0312 ". Could this be the reason I was getting error message since the following expression does not include null and incomplete date of birth?

(DT_DBDATE)(SUBSTRING([DateofBirth] ,1,2) + "/" + SUBSTRING([DateofBirth] ,3,2) + "/" + SUBSTRING([DateofBirth] ,5,2))


Here are the error messages:

[Derived Column [1014]] Error: An error occurred while attempting to perform a type cast.

[Derived Column [1014]] Error: The "component "Derived Column" (1014)" failed because error code 0xC0049064 occurred, and the error row disposition on "output column "DOB" (2292)" specifies failure on error. An error occurred on the specified object of the specified component.

[DTS.Pipeline] Error: The ProcessInput method on component "Derived Column" (1014) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

[DTS.Pipeline] Error: Thread "WorkThread0" has exited with error code 0xC0209029.

View 13 Replies View Related

How To Increment SSIS Variable (Date)

Apr 11, 2008

My requirement demands me to use a extract based on a date. And on success i need to increment this date by a day.
So i have a declared two variables, vDate and vSourceSQL. I am using the sql statement from variable in the data access method. My package is successful.
Reading through the forum and after following this blog
http://blogs.conchango.com/jamiethomson/archive/2005/02/09/SSIS_3A00_-Writing-to-a-variable-from-a-script-task.aspx
i now have a script task which will increment my "vDate" variable and i am calling it as a post execute task. I have posted the error below. Tried to get atleast the sample provided to succeed, but.... this is what i get.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Flat File Destination" (800)" wrote 12 rows.
Error: 0xC001405C at Script Task Data Flow Task: A deadlock was detected while trying to lock variables "User::vMyVar" for read/write access. A lock cannot be acquired after 16 attempts. The locks timed out.
Error: 0xC001405D at Script Task Data Flow Task: A deadlock was detected while trying to lock variables "System::InteractiveMode" for read access and variables "User::vMyVar" for read/write access. A lock cannot be acquired after 16 attempts. The locks timed out.
Error: 0x2 at Script Task Data Flow Task: The script threw an exception: A deadlock was detected while trying to lock variables "User::vMyVar" for read/write access. A lock cannot be acquired after 16 attempts. The locks timed out.
Task failed: Script Task Data Flow Task
Warning: 0x80019002 at OnPostExecute: The Execution method succeeded, but the number of errors raised (5) 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.
Warning: 0x80019002 at SqlCommandFromVariable: The Execution method succeeded, but the number of errors raised (5) 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 "SqlCommandFromVariable.dtsx" finished: Failure.
The program '[2316] SqlCommandFromVariable.dtsx: DTS' has exited with code 0 (0x0).
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

View 7 Replies View Related







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