Insight CSV importer not detecting all entries from a CSV file due to extra double quote(s)

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

After importing objects from a CSV file,

  • Some rows in a CSV file are not imported into Insight as new objects
  • Double quotes in some values are missing
  • Some values have unintended change

Here's a CSV file to create 3 new objects namely ABC, DEF and PQR. Description column is to be mapped with an attribute of type Text area in Insight.

Name,Description
ABC,"Line 1

Line 2

Line" 3"
DEF,"wqferghr
wqferghr

reg"
PQR,"

Minim eirmod eligendi mei eu. Pri odio elaboraret cu, duo eruditi appetere eu. Vel eius fuisset efficiendi an, id mea iusto latine maiorum. Omnes tantas laoreet ea ius. Usu ""option"" accusam inciderint id.

Cum at nullam numquam, vel utroque meliore repudiandae at."


Expected Result

  • 3 entries are detected in the CSV file

  • 3 new objects with its complete description are created as shown below


Actual Result

  • Only 1 entry is detected in the CSV file

  • Only 1 object is created with the description that includes the data that should be in the next object


The following appears in the insight_import.log

021-10-25 13:03:27,831 [insight-InsightImportThreadGroup-worker-thread-1] | Row not read on line number (heading row included) 3 due to The number of columns to be processed (1) must match the number of CellProcessors (2): check that the number of CellProcessors you have defined matches the expected number of columns being read/written
2021-10-25 13:03:27,831 [insight-InsightImportThreadGroup-worker-thread-1] | Row not read on line number (heading row included) 4 due to The number of columns to be processed (1) must match the number of CellProcessors (2): check that the number of CellProcessors you have defined matches the expected number of columns being read/written
2021-10-25 13:03:27,831 [insight-InsightImportThreadGroup-worker-thread-1] | Row not read on line number (heading row included) 5 due to The number of columns to be processed (3) must match the number of CellProcessors (2): check that the number of CellProcessors you have defined matches the expected number of columns being read/written


原因

 Multiple lines are allowed for Text area type attribute and the complete value should be placed between 2 double quotes. Any additional double quote(s) will cause data to be created in an unexpected way 


ソリューション

  • Make sure that the complete value is placed correctly between 2 double quotes. 
  • To include a delimiter or a double quote character, another pair of double quotes should be used (e.g. Line 13 in the example CSV file below)

The modified CSV file is as follows.

Name,Description
ABC,"Line 1

Line 2

Line 3"
DEF,"wqferghr
wqferghr

reg"
PQR,"

Minim eirmod eligendi mei eu. Pri odio elaboraret cu, duo eruditi appetere eu. Vel eius fuisset efficiendi an, id mea iusto latine maiorum. Omnes tantas laoreet ea ius. Usu ""option"" accusam inciderint id.

Cum at nullam numquam, vel utroque meliore repudiandae at."



説明 Insight CSV importer not detecting all entries from a CSV file due to extra double quote(s)
製品Insight - Asset Management
最終更新日: 2021 年 10 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.