Hi,
I am trying to connect to GCP BigQuery in script task using c#. However, I get the error when package is executed.
I have already loading the assemblies explicitly in the code.

Hi,
I am trying to connect to GCP BigQuery in script task using c#. However, I get the error when package is executed.
I have already loading the assemblies explicitly in the code.

This is how I have written the inner except code but the issue is that as soon as package is run, it immediately give error pop up.
catch (Exception ex)
{
Console.WriteLine(String.Concat(ex.StackTrace, ex.Message));
if (ex.InnerException!=null)
{
Console.WriteLine("Inner Exception");
Console.WriteLine(String.Concat(ex.InnerException.StackTrace, ex.InnerException.Message));
}
Console.ReadLine();
Dts.TaskResult = (int)ScriptResults.Failure;
}
Console.WriteLine isn't going to work inside an SSIS script task as there is no console window. Ideally use FireInformation or equivalent to write the error to the log and then look at the log. Alternatively for quick testing you can use MessageBox.Show although it might not work outside the debugger. Refer to this article on that topic.
That particular exception has InnerException set. Within the inner exception is the actual error that occurred. You'll need to pick it apart to see what is failing.
8 people are following this question.