使用SSIS脚本任务C#和加载到SQL Server表中提取XML API数据 [英] Extracting XML API Data Using SSIS Script Task C# and Loading into SQL Server table
问题描述
大家好,
Hi All,
我在SSIS脚本任务中寻找一个解决方案,帮助我提取XML API数据使用脚本任务到SQL 表
I am looking for one solution in SSIS script task which helps me to extract XML API data using the script task to SQL table
我不是C#开发人员,所以无法得到它。
I am not a C# developer, so unable to get it.
来源网址是 https://roatp.apprenticeships.sfa.bis.gov.uk/api/providers
请帮助我获得查询结果
Kindly help me to get the result of my query
感谢& amp;问候,Vipin< g class =" gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id =" 9" id =" 9"> jha< / g> MCP
Thankx & regards, Vipin <g class="gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="9" id="9">jha</g> MCP
推荐答案
SSIS支持直接读取XML文件作为数据源。您不应该在C#脚本中执行此操作。如何执行此操作的示例是
here 。将XML加载到SSIS中,使用转换将数据操作为您需要的任何格式,然后保存。只有在没有转换符合您需要的情况下,您才需要执行脚本任务。可能会下降到C#来实现
这一点逻辑。
SSIS supports reading XML files directly as data sources. You shouldn't be doing this in a C# script. An example of how to do it is here. Load the XML into SSIS, use transforms to manipulate the data into whatever format you need and then save it. The only time you'd need a script task is if there isn't a transform that does what you want. Then you might drop down to C# to implement that little bit of logic.
这篇关于使用SSIS脚本任务C#和加载到SQL Server表中提取XML API数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!