• <legend id='0rfSg'><style id='0rfSg'><dir id='0rfSg'><q id='0rfSg'></q></dir></style></legend>

    <small id='0rfSg'></small><noframes id='0rfSg'>

      <bdo id='0rfSg'></bdo><ul id='0rfSg'></ul>

      1. <i id='0rfSg'><tr id='0rfSg'><dt id='0rfSg'><q id='0rfSg'><span id='0rfSg'><b id='0rfSg'><form id='0rfSg'><ins id='0rfSg'></ins><ul id='0rfSg'></ul><sub id='0rfSg'></sub></form><legend id='0rfSg'></legend><bdo id='0rfSg'><pre id='0rfSg'><center id='0rfSg'></center></pre></bdo></b><th id='0rfSg'></th></span></q></dt></tr></i><div id='0rfSg'><tfoot id='0rfSg'></tfoot><dl id='0rfSg'><fieldset id='0rfSg'></fieldset></dl></div>
        <tfoot id='0rfSg'></tfoot>
      2. Apache Nifi 如何使用嵌套数组 JSON 加载 JSON 并调用

        时间:2023-08-22

        <small id='pBsUO'></small><noframes id='pBsUO'>

            <tbody id='pBsUO'></tbody>

            <tfoot id='pBsUO'></tfoot>
            1. <i id='pBsUO'><tr id='pBsUO'><dt id='pBsUO'><q id='pBsUO'><span id='pBsUO'><b id='pBsUO'><form id='pBsUO'><ins id='pBsUO'></ins><ul id='pBsUO'></ul><sub id='pBsUO'></sub></form><legend id='pBsUO'></legend><bdo id='pBsUO'><pre id='pBsUO'><center id='pBsUO'></center></pre></bdo></b><th id='pBsUO'></th></span></q></dt></tr></i><div id='pBsUO'><tfoot id='pBsUO'></tfoot><dl id='pBsUO'><fieldset id='pBsUO'></fieldset></dl></div>
              • <legend id='pBsUO'><style id='pBsUO'><dir id='pBsUO'><q id='pBsUO'></q></dir></style></legend>

                • <bdo id='pBsUO'></bdo><ul id='pBsUO'></ul>
                  本文介绍了Apache Nifi 如何使用嵌套数组 JSON 加载 JSON 并调用 Oracle 存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我是 Nifi 的新手,但我有一些 JSON 数据,它是一个数据数组,在每个数组元素中,还有另一个嵌套的数组数据.

                  I am new to Nifi, but I have some JSON data which is an array of data and in each array element, there is another nested array data.

                  虽然我能够获取文件以加载 JSON,但我遇到的问题如下:

                  Whilst I am able to get file to load the JSON, where I am struggling is on the following:

                  • 展平每个数组和嵌套数组 - 包含换行符的嵌套数组存在问题.我已尝试使用处理器将其删除,但未将其删除
                  • 提取需要的数据
                  • 要组织提取的数据,将其作为参数传递给 Oracle 存储过程以供执行

                  我已经使用了 Get File、JoltTransformJson、ExecuteSQL、GetAttributes,但我没有看到一个结构,其中对于 JSON 数组中的每个元素和展平嵌套 JSON 的属性列表可以传递给存储过程.

                  I have used Get File, JoltTransformJson, ExecuteSQL, GetAttributes, but what I am not seeing is a structure where for each element in the array of JSON and for the flatten out nested JSON a list of attributes that can passed on to the Stored Procedure.

                  谁能提供任何分步指导?

                  Can anyone give any step by step guidance?

                  下面是一封关于 JSON 结构的电子邮件,以提供一个想法-

                  Below is an email of structure of the JSON to give an idea-

                  [{app_id":1",日期时间":2020-11-30T12:21:25.447430",供应商名称":abc",doc_id":123345",数据":"{\n header {\n l_Id = { 1 2 3 3 4 5 6 11 }\n identifer = 123456789\n country = GB\n commonIdentifier {\n ident {\n opps = 6175\n etni {\n format =1234567\n }\n }\n commonIdentityId = 0\n }\n sequence = 0\n timeStamp = 20201130002255.0Z\n timeStampQual = timeFound\n }\n data {\n sequence [0] {\n type = type\n content {\n etni {\n params {\n iD = { 1234567 }\n version = version\n identifier = 1234567\n identifier {\n commonidentityid = 30\n id {\n opps = 6175\n netId{\n 格式 = 12563412\n }\n }\n }\n 时间戳 {\n localTime {\ngeneraltime = 20201130122255.000Z\n BSWT = notProvided\n }\n }\n direction = forward\n state = nothing\n release = 9\n nature = ball\n }\n }\n }\n }\n }\n}\n",},{app_id":1",日期时间":2020-11-30T12:21:25.447430",供应商名称":abc",doc_id":123345",数据":"{\n header {\n l_Id = { 1 2 3 3 4 5 6 11 }\n identifer = 123456789\n country = GB\n commonIdentifier {\n ident {\n opps = 6175\n etni {\n format =1234567\n }\n }\n commonIdentityId = 0\n }\n sequence = 0\n timeStamp = 20201130002255.0Z\n timeStampQual = timeFound\n }\n data {\n sequence [0] {\n type = type\n content {\n etni {\n params {\n iD = { 1234567 }\n version = version\n identifier = 1234567\n identifier {\n commonidentityid = 30\n id {\n opps = 6175\n netId{\n 格式 = 12563412\n }\n }\n }\n 时间戳 {\n localTime {\ngeneraltime = 20201130122255.000Z\n BSWT = notProvided\n }\n }\n direction = forward\n state = nothing\n release = 9\n nature = ball\n }\n }\n }\n }\n }\n}\n",}]

                  [ { "app_id":"1", "date_time":"2020-11-30T12:21:25.447430", "supplier_name":"abc", "doc_id":"123345", "data":" {\n header {\n l_Id = { 1 2 3 3 4 5 6 11 }\n identifer = 123456789\n country = GB\n commonIdentifier {\n ident {\n opps = 6175\n etni {\n format = 1234567\n }\n }\n commonIdentityId = 0\n }\n sequence = 0\n timeStamp = 20201130002255.0Z\n timeStampQual = timeFound\n }\n data {\n sequence [0] {\n type = type\n contents {\n etni {\n params {\n iD = { 1234567 }\n version = version\n identifier = 1234567\n identifier {\n commonidentityid = 30\n id {\n opps = 6175\n netId {\n format = 12563412\n }\n }\n }\n timeStamp {\n localTime {\n generaltime = 20201130122255.000Z\n BSWT = notProvided\n }\n }\n direction = forward\n state = nothing\n release = 9\n nature = ball\n }\n }\n }\n }\n }\n}\n", }, { "app_id":"1", "date_time":"2020-11-30T12:21:25.447430", "supplier_name":"abc", "doc_id":"123345", "data":" {\n header {\n l_Id = { 1 2 3 3 4 5 6 11 }\n identifer = 123456789\n country = GB\n commonIdentifier {\n ident {\n opps = 6175\n etni {\n format = 1234567\n }\n }\n commonIdentityId = 0\n }\n sequence = 0\n timeStamp = 20201130002255.0Z\n timeStampQual = timeFound\n }\n data {\n sequence [0] {\n type = type\n contents {\n etni {\n params {\n iD = { 1234567 }\n version = version\n identifier = 1234567\n identifier {\n commonidentityid = 30\n id {\n opps = 6175\n netId {\n format = 12563412\n }\n }\n }\n timeStamp {\n localTime {\n generaltime = 20201130122255.000Z\n BSWT = notProvided\n }\n }\n direction = forward\n state = nothing\n release = 9\n nature = ball\n }\n }\n }\n }\n }\n}\n", } ]

                  推荐答案

                  有FlattenJSON 处理器如果您想拆分 JSON,则可以使用 JOLT 和一些网站,例如 JOLT 变换

                  there is the FlattenJSON Processor If you're looking to split the JSON, there is the possibility to use JOLT and some sites such as this JOLT transformation

                  另一种选择是相应地拆分 JSON 并使用拆分值.我发现网站 https://jsonpath.com/ 有助于决定拆分的工作方式.我知道这不是一步一步的,但是使用 SplitJSON 处理器,然后可能是 ExtractText 处理器,您将能够获得所需的信息.如果不知道数据的确切格式,以及需要哪些数据部分,就很难一步一步地提供准确的数据.

                  Another option could be to split the JSON accordingly and use the split values. I have found that the website https://jsonpath.com/ is helpful for deciding how the split could work. I know this isnt a step by step, but using the SplitJSON processor and then maybe an ExtractText Processor, you would be able to get the desired information. Without knowing the exact format of the data, and which parts of the data that would be desired, providing an exact step by step will be difficult.

                  这篇关于Apache Nifi 如何使用嵌套数组 JSON 加载 JSON 并调用 Oracle 存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:putSql处理器后executeSql失败 下一篇:Flowfile 绝对路径 Nifi

                  相关文章

                  最新文章

                  <legend id='aTDi9'><style id='aTDi9'><dir id='aTDi9'><q id='aTDi9'></q></dir></style></legend>

                  <small id='aTDi9'></small><noframes id='aTDi9'>

                  <i id='aTDi9'><tr id='aTDi9'><dt id='aTDi9'><q id='aTDi9'><span id='aTDi9'><b id='aTDi9'><form id='aTDi9'><ins id='aTDi9'></ins><ul id='aTDi9'></ul><sub id='aTDi9'></sub></form><legend id='aTDi9'></legend><bdo id='aTDi9'><pre id='aTDi9'><center id='aTDi9'></center></pre></bdo></b><th id='aTDi9'></th></span></q></dt></tr></i><div id='aTDi9'><tfoot id='aTDi9'></tfoot><dl id='aTDi9'><fieldset id='aTDi9'></fieldset></dl></div>
                  <tfoot id='aTDi9'></tfoot>

                      <bdo id='aTDi9'></bdo><ul id='aTDi9'></ul>