Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: error path handling #425

Open
Radamonas opened this issue Mar 22, 2023 · 4 comments
Open

Question: error path handling #425

Radamonas opened this issue Mar 22, 2023 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@Radamonas
Copy link

ETLs like SSIS supports error handling by calling/executing routines to handle failures:
image

Also there is Event handler for all errors, like in pic below:
image

Is there ways to do similar routines with Etl.Net?

@Radamonas Radamonas changed the title Question: error path Question: error path handling Mar 22, 2023
@paillave paillave self-assigned this Mar 22, 2023
@paillave paillave added the question Further information is requested label Mar 22, 2023
@paillave
Copy link
Owner

error handling in SSIS is done at controlflow level. But it has nothing for the datafow. If the dataflow, the control flow handles it, and take the proper decision. ETL.NET is the replacement of the dataflow, and the external dotnet code that triggers it is the replacement of the control flow. If any failure, the process will fail, then the part that triggered the failed ETL.NET process will get all the details about the failure in the response.

This said, you can handle exception your self within select or do operators and return a payload that permits you to distinguish rows failed from rows that succeeded so that you can apply a different mass process on it.

@mickvikt
Copy link

It is clear about error handling in select and do operators, but what is the idiomatic way for handling errors/exceptions in other operators like CrossApplySqlServerQuery or WriteToFile.

Should the whole chained statement be wrapped in try/catch?

@paillave
Copy link
Owner

like in SSIS or many other ETL, in this situation, your whole process will fail, and you will have to catch it from outside control flow like described here: https://paillave.github.io/Etl.Net/docs/tutorials/trackAndCheck#get-the-error-if-it-occurs.

The detailed behavior of the engine is described here: https://paillave.github.io/Etl.Net/docs/quickstart/principle#detailed-principle

  • When an error occurs in the operator, this one emits it to the runtime.
  • When the runtime is notified of an error, it requests every operator to stop its job, then stops, and then returns a failed execution status along with the notified error.

@mickvikt
Copy link

Thank you, @paillave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants