csvをインポートするトレイルヘッドのまとめ

[データのインポートに戻る](https://qiita.com/Keiji_otsubo/items/9707dc2361087a97f914)
[Trailhead関係　個別の課題別](https://qiita.com/Keiji_otsubo/items/56eb7a90bb72138ece1f)


+ [CSVファイルのフォーマットが問題となっている場合(カンマでなくセミコロンになっている)](https://qiita.com/Keiji_otsubo/items/69f5b89dd539dc0f3b09)
+ [The 'lead' records from the CSV were not found. Please check the instructions](https://qiita.com/Keiji_otsubo/items/23a95352e110ad6684d2)

# インポートウィザードのズームアウト

このエラーメッセージでも有効です。
**The matching field you chose (Name) is not mapped and is required for an Update and Insert operation.**

+ [the matching field name is not mapped and is required for an update and insert opertions.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ajTVN)

:::note
When mapping fields, there are instances that you have already selected the field to map however the option to 'map' it does not appear on the pop-up window. When this happens, zoom out your browser's page settings so that the mapping button will be visible.
:::

フィールドをマッピングするときに、マッピングするフィールドをすでに選択している場合がありますが、「マッピング」するオプションはポップアップウィンドウに表示されません。この場合、ブラウザのページ設定をズームアウトして、マッピングボタンが表示されるようにします。

ズームアウトした結果の画面の例
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/93ddf314-c127-e77d-3a3e-abdca88e7763.png)


# 画面の解像度が低い時の回答例

:::note
When mapping fields, there are instances that you have already selected the field to map however the option to 'map' it does not appear on the pop-up window. When this happens, zoom out your browser's page settings so that the mapping button will be visible.

Press and hold the Ctrl key and press the - (minus) key or + (plus) key to zoom out or in of a web page or document.
:::

関連キーワード
 The "Cancel/Previous/Next" bar is showing up over the field mapping box. 
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4c5a4529-f373-d00f-4038-88357818f714.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/d1c1307a-3808-9a0e-4121-dcfa1c76e8e6.png)

[How do I need to map the fields during data import?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000FxPw9SAF)

低解像度のマシンを使用している場合、データインポートウィザードはマップフィールドポップアップウィンドウのキャンセルボタンとOKボタンを非表示にします。
[既知の問題](https://trailblazer.salesforce.com/issues_view?id=a1p3A000000ncw7QAA&title=data-import-wizard-hide-cancel-and-ok-buttons-of-map-field-popup-window-when-using-lower-resolution-machine)


# 画面のズーム率90 %

+ [Import Data - Challenge](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000O9oHwSAJ)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/ff970418-a4ab-20f3-802f-180dcd54249d.png)




# そのほかの検討ポイントを整理(2つのチャレンジが混在していそうです)


指示に正しく従ったのに、「CSVの「リード」レコードが見つかりませんでした。指示を確認してください」というエラーが表示され続けるのはなぜですか。
[Why do I keep getting the error **"The 'lead' records from the CSV were not found. Please check the instructions"** when I have followed the instructions correctly?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000C6G5e)

+ Please once check that your locale settings is set  English (United States) 
+ I replaced the ";" by "," But... be carefull, there are "," characters in the data too! 




[Why do I keep getting the error "The 'lead' records from the CSV were not found. Please check the instructions" when I have followed the instructions correctly?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000C6G5eSAF)

ファイルの作成方法が問題だったようです。
I was able to figure it out with some help from a friend. It required me to save the file in windows as file type All Files and then imported it again. That solved the problem. I hope this helps someone else who might get stuck on this module.



# csvを自分で作ってしまったことでの間違え

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/901556f6-25a8-8466-c067-ba8c878f847a.png)

[Data Import wizard](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000FxBvNSAV)



# 以前のチャレンジの設定が問題

+ [I was trying to complete hands on :- Import data wizard, but getting errors while importing](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000PfDJp)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/bb62df5c-06b4-373d-a644-6d9f3ab3713d.png)

:::note
I think the settings for the previous challenge remain. Please deactivate.

Go to Setup --> Object manager --> Choose (contact) --> Fields & Relationships --> Edit Loan Amount and uncheck Required checkbox. 

 Go to Setup --> Object manager --> Choose (contact) --> Fields & Relationships --> Edit Street Address and uncheck Required checkbox. 
:::

+ [I am getting error while importing data.](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000GfSDZSA3)

:::note alert
You need to map the **required field Contact: Loan Amount** but this field is neither present in the challenge nor in the csv file please help me regarding this error 
:::

回答

:::note
This error means that there is a custom field on Contact object called Loan Amount and it is marked as required in the field details. If you don't want it to be required field, uncheck the required box. If you want it to be a mandatory field please map the field while loading the data.

このエラーは、ContactオブジェクトにLoan Amountというカスタムフィールドがあり、フィールドの詳細で必須としてマークされていることを意味します。必須フィールドにしたくない場合は、必須ボックスのチェックを外してください。必須フィールドにする場合は、データのロード中にフィールドをマップしてください。
:::






# ファイルの拡張子の問題？

CSVになっていない？

私が抱えていた問題は、.txtファイルを.csvに変換したことです。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/3496c8a4-f325-be87-3c28-1297341088b4.png)

[データのインポート方法を作成するときにエラーが発生しました](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000HDdYC)


# CSV ファイルとしてダウンロードできません。.xls としてのみダウンロードできます。

+ [Cannot dowload as CSV file, only downloads as .xls](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007cmSxo)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/0468db58-f656-e64c-def3-59037cfc1fce.png)


:::note
It was a browser issue, it would download as an excel file using Firefox. I switched to safari and it worked as the instructions.

それはブラウザの問題でした。Firefox を使用すると Excel ファイルとしてダウンロードされます。Safari に切り替えると、指示どおりに動作しました。
:::

# We couldn't find the contact records from the CSV file. Make sure you import the CSV file correctly.

+ [Help with data upload](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000HDvf8)
--------------------------------

+ [Import data using the Data Import Wizard. ](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000E9WCYSA3)
+ [We couldn't find the contact records from the CSV file. Make sure you import the CSV file correctly.](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000E9rtUSAR)
+ [We couldn't find the contact records from the CSV file. Make sure you import the CSV file correctly.](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000E9zGpSAJ)
+ [Data import wizard challenge](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000G4WccSAF)

+ [Cannot complete import data challenge. Also cannot figure out what I'm doing wrong.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007YwH7J)

:::note
Please check this article.

https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000E9WCYSA3
:::


:::note
It should be mentioned that there is no "Lead Source" field to map Lead onto if you select "Add new records" under "What do you want to do?".  You have to select "Add new and update existing records" in order to get the field.
:::


#  Import Data Trailhead Challenge Solution

[データのインポート](https://trailhead.salesforce.com/ja/content/learn/modules/lex_implementation_data_management/lex_implementation_data_import)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/b8a48e3a-1396-0451-6282-77bf9d8a5979.png)

[Admin Trail Import Data Badge - Is there a standard cvs spreadsheet for this challenge?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000JxysWSAR)

# MS WindowsでなくてもCSVファイルは問題ないか？

+ [Is it possible to do the Admin Training without the Windows App?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000Jg47BSAR)

:::note
The csv file is a comma delimited text file so I think it should be fine

[Opening and Saving Text CSV Files](https://help.libreoffice.org/latest/lo/text/scalc/guide/csv_files.html)
:::

# 英語の解答例

+ [Its showing below error while trying map the unmapped fields and i am not getting where is the error.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V000076CAEtSAO)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/d02b0e39-ead2-6870-f35b-f73f87ee869c.png)

:::note
May I recommend you to please map the require field Last Name also to get rid of this error. Please remember that Last Name is a required field under Contact to insert a Contact in Salesforce. You should have a column called Last Name in the sheet/data file that your uploading. 
:::

+ [Boa noite meus caros amigos! Não estou conseguindo concluir essa etapa de importação de dados, alguém conseguiria me ajudar?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007MXh2w)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/3c5a5d2a-157c-75f2-4016-144d6a5c6f97.png)



# You need to map the required field Contact: Street Address.

+ [I'm trying to do the Data Import Wizards module, but keep getting the error message "You need to map the required field Contact: Street Address."](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8tpd)

住所のマッピングは必要なくなったみたいです。


# lead

+ [In use the Data Import wizard tutorial I added 44 records from the CSV file Lead Import that I downloaded. I also got a confirmation of successful import.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Ot8Z7)

I was on the wrong playground before. 

# ビューの選択を間違っている

+ [Data import is successful but still data is not displayed](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007erxNi)