Save file to Azure Data lake store using SSIS script task
Raj D
591
Reputation points
Hi, I am looking at different options to save file using SSIS script task to Azure data lake store gen2. I have an use case where I make a call to an api and save the xml payload on to an Azure data lake store gen2 and looking at options to connect to an Azure tenant and save files to the storage account. I am using C# code in my script task. I am already using the below code to reference a third party dll, if I were to reference other Azure storage dll how would I include them?
Could you please guide me to achieve this.
static string path = null;
static ScriptMain()
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
}
public void Main()
{
path = (string)Dts.Variables["User::path"].Value;
MethodsWhichUsesDll();
}
public void MethodsWhichUsesDll()
{
//Code which uses your dll
}
static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
if (args.Name.Contains("thirdparty"))
{
return System.Reflection.Assembly.LoadFile(System.IO.Path.Combine(path, "thirdparty.dll"));
}
return null;
}
Thank you in advance.
Sign in to answer