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

  2. <small id='D2K0s'></small><noframes id='D2K0s'>

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

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

    1. <tfoot id='D2K0s'></tfoot>

      如何在 NiFi 中映射流文件中的列数据?

      时间:2023-08-22

            <tbody id='HdAeR'></tbody>

              <bdo id='HdAeR'></bdo><ul id='HdAeR'></ul>
            • <small id='HdAeR'></small><noframes id='HdAeR'>

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

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

              • 本文介绍了如何在 NiFi 中映射流文件中的列数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我有一个具有以下结构的csv文件,

                i have csv file which having following structure.,

                Alfreds,Centro,Ernst,Island,Bacchus
                Germany,Mexico,Austria,UK,Canada
                01,02,03,04,05
                

                现在我必须将这些数据移动到数据库中,如下所示.

                Now i have to move that data into database like below.

                Name,City,ID
                Alfreds,Germay,01
                Centro,Mexico,02
                Ernst,Austria,03
                Island,UK,04
                Bacchus,Canda,05
                

                我尝试映射这些列,但我无法按列提取数据.

                i try to map those colums but i can't able to extract the data in column wise.

                这里我按列输入数据,但我需要在 SQLServer 中按行插入数据

                Here my input data in column wise but i need to insert those in row wise in SQLServer

                任何人都可以建议在 sql server 中将列数据转换为行数据的方法吗?.

                Can anyone suggest way to transfer column wise data into row wise in sql server?.

                谢谢

                推荐答案

                @Andy,

                在 NiFi 中也可以不使用 ExecuteScript.

                It could be possible in NiFi also without using ExecuteScript.

                我在 ExtractText 中提取了 3 个输入行作为 input.1,input.2,input.3.然后使用 表达式语言 并将其存储在 "TotalCount" 属性中.

                I have extract the 3 input rows as input.1,input.2,input.3 in ExtractText. And then count number of columns in "input.1" using AnydelinateValues in expression language and store that in "TotalCount" Attribute.

                最初制作Count=1".

                Initially made "Count=1".

                使用循环概念通过使用Count"获取第一列,然后在RouteOnAttribute中增加Count"检查Count""le(totalcount)"

                Using Loop Concept to get the first column by using "Count" and then increment "Count" Check "Count" in RouteOnAttribute "le(totalcount)"

                现在使用 "Count" 属性形成插入查询.

                Now form insert Query with "Count" Attribute.

                它对我来说效果很好.它可能对某人有用.

                It worked well for me.It could be useful for someone.

                这篇关于如何在 NiFi 中映射流文件中的列数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Nifi PutSQL 时间戳/日期时间错误无法转换错误 下一篇:NIFI - QueryDatabaseTable 处理器.如何查询被修改的行

                相关文章

                最新文章

              • <legend id='PZ3ZP'><style id='PZ3ZP'><dir id='PZ3ZP'><q id='PZ3ZP'></q></dir></style></legend>

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

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