SSIS throws an “DTS_E_PRIMEOUTPUTFAILED” error in SSIS Data Flow with Excel sourceWhat does error 0xC02020C4 mean in SSIS?DTS_E_PRIMEOUTPUTFAILED with error code 0xC0202091 when loading flat fileSSIS: [Excel Source [65]] ErrorSSIS CSV Import Error 0xC0202092 DTS_E_PRIMEOUTPUTFAILEDError on Import Data ExcelError Occurred while skipping data rowsHow to write joins using Dynamic AX source component in SSISSSIS errors are coming while loading the dynamic excel into ssms tableVS 2015 Executing SSIS Package ErrorSSIS output error when there are no records on Data Flow Task

How can I deal with someone that wants to kill something that isn't supposed to be killed?

How to run a substitute command on only a certain part of the line

My current job follows "worst practices". How can I talk about my experience in an interview without giving off red flags?

Can an infinite group have a finite number of elements with order k?

How am I supposed to put out fires?

How can I print a 1 cm overhang with minimal supports?

Is it possible to eat quietly in Minecraft?

Wiring IKEA light fixture into old fixture

What is "It is x o'clock" in Japanese with subject

How does mathematics work?

What is a plausible power source to indefinitely sustain a space station?

Difference Between Active and Passive Volume Pedals?

Are rockets faster than airplanes?

Has Peter Parker ever eaten bugs?

On the history of Haar measure

Does downing a character at the start of its turn require an immediate Death Saving Throw?

How to Sow[] until I've Reap[]'d enough?

Can't understand how static works exactly

Is it OK to accept a job opportunity while planning on not taking it?

Why are Oscar, India, and X-Ray (O, I, and X) not used as taxiway identifiers?

How can I calculate the cost of Skyss bus tickets

Why can't a country print its own money to spend it only abroad?

How can I indicate that what I'm saying is not sarcastic online?

Other than a swing wing, what types of variable geometry have flown?



SSIS throws an “DTS_E_PRIMEOUTPUTFAILED” error in SSIS Data Flow with Excel source


What does error 0xC02020C4 mean in SSIS?DTS_E_PRIMEOUTPUTFAILED with error code 0xC0202091 when loading flat fileSSIS: [Excel Source [65]] ErrorSSIS CSV Import Error 0xC0202092 DTS_E_PRIMEOUTPUTFAILEDError on Import Data ExcelError Occurred while skipping data rowsHow to write joins using Dynamic AX source component in SSISSSIS errors are coming while loading the dynamic excel into ssms tableVS 2015 Executing SSIS Package ErrorSSIS output error when there are no records on Data Flow Task






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I developing an SSIS process that extracts data from Excel files and loads them into SQL Server DB.



I have separate data flows for each worksheet in the source file. The Excel file contains data in different formats (but can contain invalid data as well), so I'm using explicit type casting.



In case of dates, I'm using a cdate(f1) as f1 construction in the SQL statement (with number changing according to the column), in order to prevent SSIS from deciding on the date format on its own.



This usually works fine. However, in some cases it throws an error when I try to run the process and there's an illegal value in the data:




[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on My_Excel_Source returned error code 0x80040E21.
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.
There may be error messages posted before this with more information
about the failure.




I don't have any other errors.



When I try to preview the result from within the Excel Source Editor window, I do get the data grid with data sample, as expected. When there's illegal data, the text is displayed - which is fine. In other data flows, the value of '1899-12-30' is returned and I can do whatever I want with it.



I've tried to define the data type for this column explicitly as DT_DATE, but I still get the error. I've compared all kinds of possible property settings with other data flows (that don't throw this error), and it all seems to be identical.
I've also tried to change the error handling behavior of the Excel Source component to "Ignore failure" instead of "Fail component" - no effect.



I should note, that there's no possible resource issue there. I'm dealing with just a handful of rows in each sheet (a few dozens, at most).



I expect the Excel Source component return the value of '1899-12-30' when the source cell contains an illegal value, rather than crashing the data flow.



Thanks,
David










share|improve this question
























  • which version of SSIS / SSRS are you using?

    – jimmy8ball
    Mar 26 at 14:45












  • VS 2012 / 11.0 (depends how you look at it).

    – David Efremov
    Mar 26 at 14:57

















1















I developing an SSIS process that extracts data from Excel files and loads them into SQL Server DB.



I have separate data flows for each worksheet in the source file. The Excel file contains data in different formats (but can contain invalid data as well), so I'm using explicit type casting.



In case of dates, I'm using a cdate(f1) as f1 construction in the SQL statement (with number changing according to the column), in order to prevent SSIS from deciding on the date format on its own.



This usually works fine. However, in some cases it throws an error when I try to run the process and there's an illegal value in the data:




[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on My_Excel_Source returned error code 0x80040E21.
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.
There may be error messages posted before this with more information
about the failure.




I don't have any other errors.



When I try to preview the result from within the Excel Source Editor window, I do get the data grid with data sample, as expected. When there's illegal data, the text is displayed - which is fine. In other data flows, the value of '1899-12-30' is returned and I can do whatever I want with it.



I've tried to define the data type for this column explicitly as DT_DATE, but I still get the error. I've compared all kinds of possible property settings with other data flows (that don't throw this error), and it all seems to be identical.
I've also tried to change the error handling behavior of the Excel Source component to "Ignore failure" instead of "Fail component" - no effect.



I should note, that there's no possible resource issue there. I'm dealing with just a handful of rows in each sheet (a few dozens, at most).



I expect the Excel Source component return the value of '1899-12-30' when the source cell contains an illegal value, rather than crashing the data flow.



Thanks,
David










share|improve this question
























  • which version of SSIS / SSRS are you using?

    – jimmy8ball
    Mar 26 at 14:45












  • VS 2012 / 11.0 (depends how you look at it).

    – David Efremov
    Mar 26 at 14:57













1












1








1








I developing an SSIS process that extracts data from Excel files and loads them into SQL Server DB.



I have separate data flows for each worksheet in the source file. The Excel file contains data in different formats (but can contain invalid data as well), so I'm using explicit type casting.



In case of dates, I'm using a cdate(f1) as f1 construction in the SQL statement (with number changing according to the column), in order to prevent SSIS from deciding on the date format on its own.



This usually works fine. However, in some cases it throws an error when I try to run the process and there's an illegal value in the data:




[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on My_Excel_Source returned error code 0x80040E21.
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.
There may be error messages posted before this with more information
about the failure.




I don't have any other errors.



When I try to preview the result from within the Excel Source Editor window, I do get the data grid with data sample, as expected. When there's illegal data, the text is displayed - which is fine. In other data flows, the value of '1899-12-30' is returned and I can do whatever I want with it.



I've tried to define the data type for this column explicitly as DT_DATE, but I still get the error. I've compared all kinds of possible property settings with other data flows (that don't throw this error), and it all seems to be identical.
I've also tried to change the error handling behavior of the Excel Source component to "Ignore failure" instead of "Fail component" - no effect.



I should note, that there's no possible resource issue there. I'm dealing with just a handful of rows in each sheet (a few dozens, at most).



I expect the Excel Source component return the value of '1899-12-30' when the source cell contains an illegal value, rather than crashing the data flow.



Thanks,
David










share|improve this question
















I developing an SSIS process that extracts data from Excel files and loads them into SQL Server DB.



I have separate data flows for each worksheet in the source file. The Excel file contains data in different formats (but can contain invalid data as well), so I'm using explicit type casting.



In case of dates, I'm using a cdate(f1) as f1 construction in the SQL statement (with number changing according to the column), in order to prevent SSIS from deciding on the date format on its own.



This usually works fine. However, in some cases it throws an error when I try to run the process and there's an illegal value in the data:




[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on My_Excel_Source returned error code 0x80040E21.
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.
There may be error messages posted before this with more information
about the failure.




I don't have any other errors.



When I try to preview the result from within the Excel Source Editor window, I do get the data grid with data sample, as expected. When there's illegal data, the text is displayed - which is fine. In other data flows, the value of '1899-12-30' is returned and I can do whatever I want with it.



I've tried to define the data type for this column explicitly as DT_DATE, but I still get the error. I've compared all kinds of possible property settings with other data flows (that don't throw this error), and it all seems to be identical.
I've also tried to change the error handling behavior of the Excel Source component to "Ignore failure" instead of "Fail component" - no effect.



I should note, that there's no possible resource issue there. I'm dealing with just a handful of rows in each sheet (a few dozens, at most).



I expect the Excel Source component return the value of '1899-12-30' when the source cell contains an illegal value, rather than crashing the data flow.



Thanks,
David







sql-server excel ssis etl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 19:08









Hadi

27.6k8 gold badges33 silver badges77 bronze badges




27.6k8 gold badges33 silver badges77 bronze badges










asked Mar 26 at 14:37









David EfremovDavid Efremov

62 bronze badges




62 bronze badges












  • which version of SSIS / SSRS are you using?

    – jimmy8ball
    Mar 26 at 14:45












  • VS 2012 / 11.0 (depends how you look at it).

    – David Efremov
    Mar 26 at 14:57

















  • which version of SSIS / SSRS are you using?

    – jimmy8ball
    Mar 26 at 14:45












  • VS 2012 / 11.0 (depends how you look at it).

    – David Efremov
    Mar 26 at 14:57
















which version of SSIS / SSRS are you using?

– jimmy8ball
Mar 26 at 14:45






which version of SSIS / SSRS are you using?

– jimmy8ball
Mar 26 at 14:45














VS 2012 / 11.0 (depends how you look at it).

– David Efremov
Mar 26 at 14:57





VS 2012 / 11.0 (depends how you look at it).

– David Efremov
Mar 26 at 14:57












1 Answer
1






active

oldest

votes


















0














If you want to let Excel control date parsing, I would try some SQL expression along the line



CASE 
WHEN IsDate(f1) THEN CDate(f1)
ELSE NULL
END AS f1


So if the f1 parses as date, it casts it to Date, otherwise it returns NULL.
If you prefer, replace NULL with any sentinel value you might prefer, like CDate('1899-12-30').



Without IsDate guard, Excel OLEDB connector does what you told it to do - tries to cast the expression to date, and fails.



The functionality of testing per-cell whether the cast works and displaying text in case of failure is part of Excel application, not Excel OLEDB connector. So we need to emulate it here using the CASE expression above.






share|improve this answer























  • Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

    – David Efremov
    Mar 31 at 7:11











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55359802%2fssis-throws-an-dts-e-primeoutputfailed-error-in-ssis-data-flow-with-excel-sour%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














If you want to let Excel control date parsing, I would try some SQL expression along the line



CASE 
WHEN IsDate(f1) THEN CDate(f1)
ELSE NULL
END AS f1


So if the f1 parses as date, it casts it to Date, otherwise it returns NULL.
If you prefer, replace NULL with any sentinel value you might prefer, like CDate('1899-12-30').



Without IsDate guard, Excel OLEDB connector does what you told it to do - tries to cast the expression to date, and fails.



The functionality of testing per-cell whether the cast works and displaying text in case of failure is part of Excel application, not Excel OLEDB connector. So we need to emulate it here using the CASE expression above.






share|improve this answer























  • Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

    – David Efremov
    Mar 31 at 7:11
















0














If you want to let Excel control date parsing, I would try some SQL expression along the line



CASE 
WHEN IsDate(f1) THEN CDate(f1)
ELSE NULL
END AS f1


So if the f1 parses as date, it casts it to Date, otherwise it returns NULL.
If you prefer, replace NULL with any sentinel value you might prefer, like CDate('1899-12-30').



Without IsDate guard, Excel OLEDB connector does what you told it to do - tries to cast the expression to date, and fails.



The functionality of testing per-cell whether the cast works and displaying text in case of failure is part of Excel application, not Excel OLEDB connector. So we need to emulate it here using the CASE expression above.






share|improve this answer























  • Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

    – David Efremov
    Mar 31 at 7:11














0












0








0







If you want to let Excel control date parsing, I would try some SQL expression along the line



CASE 
WHEN IsDate(f1) THEN CDate(f1)
ELSE NULL
END AS f1


So if the f1 parses as date, it casts it to Date, otherwise it returns NULL.
If you prefer, replace NULL with any sentinel value you might prefer, like CDate('1899-12-30').



Without IsDate guard, Excel OLEDB connector does what you told it to do - tries to cast the expression to date, and fails.



The functionality of testing per-cell whether the cast works and displaying text in case of failure is part of Excel application, not Excel OLEDB connector. So we need to emulate it here using the CASE expression above.






share|improve this answer













If you want to let Excel control date parsing, I would try some SQL expression along the line



CASE 
WHEN IsDate(f1) THEN CDate(f1)
ELSE NULL
END AS f1


So if the f1 parses as date, it casts it to Date, otherwise it returns NULL.
If you prefer, replace NULL with any sentinel value you might prefer, like CDate('1899-12-30').



Without IsDate guard, Excel OLEDB connector does what you told it to do - tries to cast the expression to date, and fails.



The functionality of testing per-cell whether the cast works and displaying text in case of failure is part of Excel application, not Excel OLEDB connector. So we need to emulate it here using the CASE expression above.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 29 at 1:27









Michael EntinMichael Entin

2,9211 gold badge16 silver badges19 bronze badges




2,9211 gold badge16 silver badges19 bronze badges












  • Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

    – David Efremov
    Mar 31 at 7:11


















  • Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

    – David Efremov
    Mar 31 at 7:11

















Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

– David Efremov
Mar 31 at 7:11






Thanks for the suggestion. It seems that the CASE construct doesn't work with Excel sources. I tried to substitute it with IIF(IsDate(f1), CDate(f1), NULL), but for some reason the IsDate part always returns 0, so I'm getting NULLs.

– David Efremov
Mar 31 at 7:11









Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55359802%2fssis-throws-an-dts-e-primeoutputfailed-error-in-ssis-data-flow-with-excel-sour%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?