【问题标题】:Parse XML File within Azure DataFlow在 Azure DataFlow 中解析 XML 文件
【发布时间】:2022-08-14 13:42:21
【问题描述】:

我确实有以下格式的 XML 文件:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
   <soap:Body>
      <ns2:getProjectsResponse xmlns:ns2=\"http://xxxxxxx\">
         <return>
            <objects>
               <binaryProperties />
               <componentProperties />
               <dateTimeProperties>
                  <entry>
                     <key>plannedend</key>
                     <value xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"xs:dateTime\">1899-12-30T00:00:00+01:00</value>
                  </entry>
               </dateTimeProperties>
               <doubleProperties>
                  <entry>
                     <key>quantity</key>
                     <value>0.0</value>
                  </entry>
               </doubleProperties>
               <durationProperties>
                  <entry>
                     <key>plannedduration</key>
                     <value>0.0</value>
                  </entry>
               </durationProperties>
               <integerProperties>
                  <entry>
                     <key>internalaccountingapproach</key>
                     <value>0</value>
                  </entry>
               </integerProperties>
               <listProperites />
               <stringProperties>
                  <entry>
                     <key>shortcut</key>
                     <value>NoC</value>
                  </entry>
                  <entry>
                     <key>name</key>
                     <value>Name of Customer</value>
                  </entry>
               </stringProperties>
               <XMLProperties />
            </objects>
         </return>
      </ns2:getProjectsResponse>
   </soap:Body>
</soap:Envelope>

我目前在 Azure 数据流中努力正确格式化/解析这个 XML 文件。 关于如何以最佳方式做到这一点的任何提示? 如果有人可以在这里给我提示,那就太好了

  • 你想用它做什么?如果您将其作为 ADF 数据流中的 XML 源来阅读,您应该能够将每个标记作为一列进行处理。

标签: xml azure azure-data-factory dataflow


【解决方案1】:

感谢您的回答。 由于 XML 文件具有某种键值结构,因此我需要解析每个键值对以获得钥匙作为属性名称和价值作为相应的属性值。结果应如下所示:

Target Structure

非常感谢你的帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-18
    • 2017-12-22
    • 2016-11-17
    • 2011-03-06
    • 2013-07-17
    • 2013-01-10
    • 1970-01-01
    相关资源
    最近更新 更多