cannot read the next data row for dataset - sql-server

I get a error message I preview my report. I had to change my credentials for data server and changes the column names, but I didn't make any changes to the query. I get this error messages when I preview my report
An error occurred during local report processing. An error has
occurred during report processing. Cannot read the next data row for
the data set. conversion failed when converting from a character
string to uniqueidentifier.
I have two parameters both take number values so, I have them setup as text values. I have one more filter converting it to int. I changed my parameters to int and removed to filter to see if it worked, but I still get the same error message. The report worked when I ran it through my other credentials, I don't know why it giving me an error message now.

As The error already pointing out, you have character data type which cannot be converted to unique identifier type.
you have data type mismatch

Related

SSIS Package error- SSIS Error Code DTS_E_PROCESSINPUTFAILED

SSIS job has failed and posting the below error
[Product Sales [749]] Error: An exception has occurred during data insertion, the message returned from the provider is: The given value of type String from the data source cannot be converted to type float of the specified target column.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Product Sales" (749) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (752). 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. There may be error messages posted before this with more information about the failure.
Can some one please advise if you have come across this kind of error
Thank you
Your error message is explaining the issue to you: "The given value of type String from the data source cannot be converted to type float of the specified target column."
Open the component that is failing and review the metadata. You have a float column somewhere and you are passing this column a string that can't be converted to a float, such as empty space or an alphanumeric value.
If you want to ensure these values are floats, you can add a script component above the one that is failing and write some code to ensure the value is properly sanitized:
string input = "1.1"; //Replace with your input buffer value
float result;
float.TryParse(input, out result); //Result = 0.0 if value was not parsed
Please add a data conversion task between source and destination to change data type from string to float , it will resolve your issue .
If still you are facing the issue then let me know the exact issue what are the source and which ssis task you are using.
Use ole db source and destination instead of odc and try to reduce the column name length and no paranthesis in column names and use table and fast load this should solve. I had the same problem where loading from analysis services cube through dax query into SQL Table of my local machine

SSIS loading data error

I have a CSV file which contains this data:
EmployeeCode,EmployeeName,EmployeeSalary,Date
101,raju,1000,2/2/2003
102,krish,100,3/4/2005
103,rishbh,320,12/9/2007
104,rani,4690,12/8/2008
105,olesia,2000,17/4/2009
106,olga,2000,12/6/2010
107,mellisa,3330,12/4/2011
And I have table called employees:
EmployeeCode nvarchar(50)
EmployeeName nvarchar(50)
EmployeeSalary money
Date datetime
When I try to load this CSV file into my table using the SSIS package it gives me an error
1) [ADO NET Destination [2]] Error: An exception has occurred during
data insertion, the message returned from the provider is: The given
value of type String from the data source cannot be converted to type
date of the specified target column.
2) [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.
The ProcessInput method on component "ADO NET Destination" (2) failed
with error code 0xC020844B while processing input "ADO NET Destination
Input" (9). 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.
There may be error messages posted before this with more information
about the failure.
However If I remove date column from the CSV and try to insert everything works well. What is wrong with date column, why is it not taking the values?
Use OLE DB Destination rather than ADO NET Destination
This issue is due to default datatype of flat file is picked "string [DT_STR] " which is equal to varchar in database , but you have made your destination table data type nvarchar is equal to Unicode string [DT_WSTR] .
Either using derived column Change data type string [DT_STR] to Unicode string [DT_WSTR]
or
Go to show advance editor (source ) >> Input and output Properties output columns >> DAta type Property >> change data type to Unicode string [DT_WSTR] for EmployeeCode and EmployeeName.
First of all you should use OLE DB destination instead of ADO.Net Destination if your table is huge and now come to issue ,in your table data type of date is as 'datetime' so either you have to change your input data to date time by using Right click on component and go to advance editor.
Otherwise you can data conversion between source and destination and convert date as "DB_Datetime".I hope you will not face any issue when you do accordingly.
I had the same issue and my answer is going to sound silly. I struggled with it for 2 days and ended up realizing that the date format was wrong in my CSV file.
for example:
105,olesia,2000,17/4/2009 -- this is invalid because it ends up taking 17 as a month and
its invalid
blew my mind when I realized it! Hope this helps anyone else going forward!

SSIS Issue with date conversion

I'm working on importing a CSV into my DB. The data should work, it's data from another application that we used to get through a dblink that we now have to get from CSV thanks to an upgrade.
Dates look like this: 4/30/2001
I tried to do a simple import like I do with numbers and strings, and got an error, so I did a derived column.
The derived column works on the dates that are not null (formula is (DT_DATE)DTE)
The derived column however failed on dates that can contain nulls. I even tried to update the formula to (ISNULL(EDTE) ? NULL(DT_DATE) : (DT_DATE)EDTE). No success, I still get the error:
[Flat File Source - O1 [6743]] Error: Data conversion failed. The data conversion for column
"EDTE" returned status value 2 and status text "The value could not be converted because of a
potential loss of data.".
Originally, in my flat file source, the dates were set to type date, and I got an error before it even got to the derived column. I've changed that to String, and it makes it to derived column, but both boxes are red. Here's the error:
[Derived Column 1 [17270]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.
The "component "Derived Column 1" (17270)" failed because error code 0xC0049063 occurred,
and the error row disposition on "input column "EDTE" (17809)" specifies failure on error.
An error occurred on the specified object of the specified component.
There may be error messages posted before this with more information about the failure.
Has anyone seen this? Am I importing my data in wrong?
I found the solution.
I import the date as a String. Then using derived column, I use this formula to convert it:
RTRIM([T-DTE]) == "" ? NULL(DT_DATE) : (DT_DATE)[T-DTE]

SSIS script component *bug* – Column data type DT_DBDATE is not supported by the PipelineBuffer class

Does anyone know exactly why these types of issues happen using a script component that can be “fixed” by deleting and re add the same code to make fix this type of issue? Why would metadata change when you delete and re add code? what happens inside the engine when this happens? What kind of issue could it ever fix to delete and re add a script component, copy the same code and rewire it?
I can reproduce at will with the following steps:
Took a working package with a script component and two output buffers. The script component has additional input columns and output columns setup for the second output buffer that are not being populated yet by the source query (OLE DB source SQL command) yet. Only one column is being populated in the second output buffer from the source query .
Copied in a new source query with additional columns for the second output buffer.
Run the package. Get the error message Column data type DT_DBDATE is not supported by the PipelineBuffer class.
Comment out the two lines for the second output buffer, run the package, the package runs successfully:
RedactedOutputBuffer.AddRow();
RedactedOutputBuffer. RedactedColumnName = Row. RedactedColumnName;
Uncomment the same two lines. The package still works. So the package is now exactly the same as when it did not work.
Well, no, it's not really a bug, it's more like SSIS doesn't try to be clever and fit square pegs in round holes.
I mean the error message is pretty clear, innit? The PipelineBuffer class doesn't have any methods to handle data types of DT_DBDATE. So it throws you a UnsupportedBufferDataTypeException:
The exception that is thrown when assigning a value to a buffer column
that contains the incorrect data type.
Anyway, since you didn't print your full error message stack, it's hard to say exactly but my guess is it tried to call SetDateTime (or GetDateTime ) on your busted column. So when you set your source query, it sets the pipeline buffer's data type as DT_DBDATE, but when you comment it out, let it run, then uncomment it out, it has converted the pipeline buffer's data type to DT_DBTIMESTAMP, which is compatible with SetDateTime or whatever method is being called from the PipelineBuffer class which is throwing your error.
Anyway, this MSDN post should give you a little more flavor on what you're seeing, but the bottom line is make sure that the field coming out of your source query is correctly identified as the field type you want it to be in your destination. If that's a SQL Server datetime field, you either need to cast it as datetime in your source query or use a Data Conversion component to explicitly cast it for your script component.

SSIS Blank Int Flat File Fail on Load

I have an SSIS package I am using to load a Fixed Width flat file. I have put in all the column lengths and have two packages against similar files working correctly. The third however keeps throwing the following error:
[Source 1 [16860]] Error: Data conversion failed. The data conversion for column "Line Number"
returned status value 2 and status text "The value could not be converted because of a
potential loss of data.".
[Source 1 [16860]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.
The "output column "Line Number" (16957)" failed because error code 0xC0209084
occurred, and the error row disposition on "output column "Line Number" (16957)"
specifies failure on error. An error occurred on the specified object of the specified
component. There may be error messages posted before this with more information about
the failure.
After doing some testing this happens for any column I have the is using the DT_I4 Data Type and has a blank in the column. I was going to try using a derived column, but this seems to fail for some of the columns even if I change them to a string data type to handle the blank as a NULL and then do a conversion to an INT later in the data flow.
In the source and the destination task I have the Retain NULL values checkbox ticked however this hasn't changed anything.
Any suggestions on handling this error where INT seems to fail at converting a blank to a NULL?
DT_I4 maps to a four byte signed integer in SSIS.
You were on the right track with your derived column. You just need to add the right expression.
You can try this expression:
ISNULL([Line Number]) ? "0":[Line Number]
This link may also be of use - see the postcode column in the example
http://www.bidn.com/blogs/DonnyJohns/ssas/1919/handling-null-or-implied-null-values-in-an-ssis-derived-column
I ended up using the approach from this blog post:
http://www.proactivespeaks.com/2012/04/02/ssis-transform-all-string-columns-in-a-data-flow-stream/
to handle all of the null and blank columns via a script task and data conversion.

Resources