PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 Général » Exit code 500 lors de l'importation d'un fichier csv dans pgAdmin4 » 18/11/2019 18:13:44

AntoineCompagnie
Réponses : 1

J'ai essayé d'importer un fichier CSV avec la méthode décrite[ici][1] après avoir créé ma base de données avec la méthode décrite[là][2]. Cependant, il m'a renvoyé une erreur 500.

100x50


La commande est:

    "C:\\Program Files (x86)\\pgAdmin 4\\v4\\runtime\\psql.exe" --command " "\\copy public.capi (a, \"Unnamed: 0\", \"Unnamed: 0.1\", \"IDI\", \"GKID\", \"S01Q01\", \"S02Q01_Gender\", \"S02Q02_Age\", \"S02Q02_Age_rec\", \"S02Q03A_Region\", \"S02Q03B_Settlement_type\", \"S02Q03C_Province\", \"S02Q03D_Quartier\", \"S02Q03D_Quartier_OTHER\", \"S02Q03E_Village\", \"S02Q03E_Village_OTHER\", \"S02Q04_Smartphone_ownership\", \"S02Q05_Internet_access\", \"S02Q06_Marital_status\", \"S02Q07A_Living_with_parents\", \"S02Q07C_HH_size\", \"S02Q08_1_Arabic_speaker\", \"S02Q08_2_Tachelhit_speaker\", \"S02Q08_3_Tarifit_speaker\", \"S02Q08_4_Tamazight_speaker\", \"S02Q08_5_French_speaker\", \"S02Q08_6_English_speaker\", \"S02Q08_7_Spanish\", \"S02Q08_8_Other_language\", \"S02Q08_Other_languages_specified\", \"S02Q09_Education\", \"S02Q10A_Employment\", \"S02Q10A_Employment_OTHER\", \"S02Q10B_Unemployed_situation\", \"S02Q11_Professional_field\", \"S02Q11_Professional_field_OTHER\", \"S02Q12_Professional_satisfaction\", \"S02Q13_1_Profession_involves_work_with_customers\", \"S02Q13_2_Profession_involves_work_with_colleagues\", \"S02Q13_3_Profession_involves_work_on_PC\", \"S02Q13_4_Profession_involves_pyhsical_labour\", \"S02Q13_5_Profession_involves_intellectual_labour\", \"S02Q13_6_Profession_involves_creative_work\", \"S02Q13_7_Profession_involves_travelling\", \"S02Q13_8_Profession_involves_work_with_money\", \"S02Q14_HH_expenses\", \"S02Q14B_HH_income\", \"S02Q14B_Socioeconomic_class\", \"S02Q15_People_in_HH_with_income\", \"S03Q02_Registered_to_vote\", \"S03Q05_Voting_in_2016\", \"S03Q05_Voting_in_2016_OTHER\", \"S03Q08_Turnout_intention\", \"S03Q09_1_Abstain_because_voting_requires_too_much_effort\", \"S03Q09_2_Abstain_because_politics_is_not_important\", \"S03Q09_3_Abstain_because_their_vote_have_no_impact_on_who_wins\", \"S03Q09_4_Abstain_because_they_trust_noone\", \"S03Q09_5_Abstain_because_of_lack_of_information\", \"S03Q09_8_Abstain_because_they_dont_know_how_or_where\", \"S03Q09_9_Abstain_because_people_will_judge_them\", \"S03Q09_10_Abstain_for_other_reasons\", \"S03Q09_OTHER\", \"S03Q12_Voting_in_next_elections\", \"S03Q12_OTHER\", \"S03Q13_1_Health\", \"S03Q13_2_Education\", \"S03Q13_3_Living_standard\", \"S03Q13_4_Fighting_crime\", \"S03Q13_5_Job_creation\", \"S03Q13_6_Fighting_corruption\", \"S03Q13_7_Economy\", \"S03Q13_8_Water_Supply\", \"S03Q13_9_Public_transport\", \"S03Q13_10_Sewage\", \"S03Q13_11_Ecology\", \"S03Q13_12_Infrastructure\", \"S03Q13_13_Social_welfare\", \"S03Q13_14_Rural_development\", \"S03Q13_15_Budget_mismanagement\", \"S03Q13_16_Culture_art_sport\", \"S03Q13_17_Defence\", \"S03Q13_18_Traffic\", \"S03Q13_19_Urbanism\", \"S03Q13_20_Rule_of_law\", \"S03Q13_21_Public_administration\", \"S03Q13_22_Housing\", \"S03Q13_23_Social_justice\", \"S03Q13_24_Else\", \"S03Q13_25_Dont_Know\", \"S03Q13_26_No_response\", \"S03Q13_27_Improve_fiscal_policy\", \"S03Q13_28_Immigration\", \"S03Q13_OTHER\", \"S03Q13B_1_Health\", \"S03Q13B_2_Education\", \"S03Q13B_3_Living_standard\", \"S03Q13B_4_Fighting_crime\", \"S03Q13B_5_Job_creation\", \"S03Q13B_6_Fighting_corruption\", \"S03Q13B_7_Economy\", \"S03Q13B_8_Water_Supply\", \"S03Q13B_9_Public_transport\", \"S03Q13B_10_Sewage\", \"S03Q13B_11_Ecology\", \"S03Q13B_12_Infrastructure\", \"S03Q13B_13_Social_welfare\", \"S03Q13B_14_Rural_development\", \"S03Q13B_15_Budget_mismanagement\", \"S03Q13B_16_Culture_art_sport\", \"S03Q13B_17_Defence\", \"S03Q13B_18_Traffic\", \"S03Q13B_19_Urbanism\", \"S03Q13B_20_Rule_of_law\", \"S03Q13B_21_Public_administration\", \"S03Q13B_22_Housing\", \"S03Q13B_23_Social_justice\", \"S03Q13B_24_Else\", \"S03Q13B_25_Dont_Know\", \"S03Q13B_26_No_response\", \"S03Q13B_27_Improve_fiscal_policy\", \"S03Q13B_28_Immigration\", \"S03Q13B_OTHER\", \"S03Q13C_1_Health\", \"S03Q13C_2_Education\", \"S03Q13C_3_Living_standard\", \"S03Q13C_4_Fighting_crime\", \"S03Q13C_5_Job_creation\", \"S03Q13C_6_Fighting_corruption\", \"S03Q13C_7_Economy\", \"S03Q13C_8_Water_Supply\", \"S03Q13C_9_Public_transport\", \"S03Q13C_10_Sewage\", \"S03Q13C_11_Ecology\", \"S03Q13C_12_Infrastructure\", \"S03Q13C_13_Social_welfare\", \"S03Q13C_14_Rural_development\", \"S03Q13C_15_Budget_mismanagement\", \"S03Q13C_16_Culture_art_sport\", \"S03Q13C_17_Defence\", \"S03Q13C_18_Traffic\", \"S03Q13C_19_Urbanism\", \"S03Q13C_20_Rule_of_law\", \"S03Q13C_21_Public_administration\", \"S03Q13C_22_Housing\", \"S03Q13C_23_Social_justice\", \"S03Q13C_27__Else\", \"S03Q13C_28_Dont_Know\", \"S03Q13C_24_No_response\", \"S03Q13C_25_Improve_fiscal_policy\", \"S03Q13C_26_Immigration\", \"S03Q13C_OTHER\", \"S03Q14_i1_Build_new_tracks_and_roads\", \"S03Q14_i2_Increase_art_sport_infrastructure\", \"S03Q14_i3_Create_job_opportunities\", \"S03Q14_i4_Build_new_mosques\", \"S05Q01_1_Use_Internet_for_Information\", \"S05Q01_2_Use_Internet_for_Enterntainment\", \"S05Q01_3_Use_Internet_for_Socialising\", \"S05Q01_4_Use_Internet_for_Selfexpression\", \"S05Q01_5_Use_Internet_for_Chores\", \"S05Q01_6_Use_Internet_for_Moodlifting\", \"S05Q02_1_Use_Facebook\", \"S05Q02_2_Use_WhatsApp\", \"S05Q02_3_Use_YouTube\", \"S05Q02_4_Use_Snapchat\", \"S05Q02_5_Use_LinkedIn\", \"S05Q02_6_Use_Instagram\", \"S05Q02_7_Use_Pinterest\", \"S05Q02_8_Use_Twitter\", \"S05Q02_97_Use_Other_Social_Media\", \"S05Q02_99_Do_not_use_Social_Media\", \"S05Q02_OTHER\", \"S05Q05_1_Prefer_enterntaining_content\", \"S05Q05_2_Prefer_cultured_content\", \"S05Q05_3_Prefer_romantic_content\", \"S05Q05_4_Prefer_religious_content\", \"S05Q05_5_Prefer_rebelious_content\", \"S05Q05_6_Prefer_exciting_content\", \"S05Q05_7_Prefer_factual_content\", \"S05Q06_i1_Calming_Intense_Aesthetics\", \"S05Q06_i2_Minimalist_Complex_Aesthetics\", \"S05Q06_i3_Nice_Edgy_Aesthetics\", \"S05Q06_i4_Abstract_Realistic_Aesthetics\", \"S06Q01_i1_E1\", \"S06Q01_i2_A1\", \"S06Q01_i3_C1\", \"S06Q01_i4_N1\", \"S06Q01_i5_O1\", \"S06Q01_i6_E2\", \"S06Q01_i7_A2\", \"S06Q01_i8_C2\", \"S06Q01_i9_N2\", \"S06Q01_i10_O2\", \"S06Q01_i11_E3\", \"S06Q01_i12_A3\", \"S06Q01_i13_C3\", \"S06Q01_i14_N3\", \"S06Q01_i15_O3\", \"S06Q01_i16_E4\", \"S06Q01_i17_A4\", \"S06Q01_i18_C4\", \"S06Q01_i19_N4\", \"S06Q01_i20_O4\", \"S06Q02_1_Values_Peace\", \"S06Q02_2_Values_Kindness\", \"S06Q02_3_Values_Duty\", \"S06Q02_4_Values_Tradition\", \"S06Q02_5_Values_Order\", \"S06Q02_6_Values_Power\", \"S06Q02_7_Values_Success\", \"S06Q02_8_Values_Fun\", \"S06Q02_9_Values_Simulation\", \"S06Q02_10_Values_Independence\", \"S06Q03_Key_Need\", \"S07Q02_ref_Shared_Phone_no\", \"Openess\", \"Conscientiousness\", \"Extraversion\", \"Agreeableness\", \"Neuroticism\", \"TL_Segment\", voter_decisiveness, \"WGHT_CAPI\", \"Segment Cluster\") FROM 'C:/Users/antoi/DOCUME~1/PROGRA~1/data/sql/capi.csv' DELIMITER ',' CSV HEADER QUOTE '\"' ESCAPE '''';""

La première ligne du fichier que j'ai essayé d'importer est :

,Unnamed: 0,Unnamed: 0.1,IDI,GKID,S01Q01,S02Q01_Gender,S02Q02_Age,S02Q02_Age_rec,S02Q03A_Region,S02Q03B_Settlement_type,S02Q03C_Province,S02Q03D_Quartier,S02Q03D_Quartier_OTHER,S02Q03E_Village,S02Q03E_Village_OTHER,S02Q04_Smartphone_ownership,S02Q05_Internet_access,S02Q06_Marital_status,S02Q07A_Living_with_parents,S02Q07C_HH_size,S02Q08_1_Arabic_speaker,S02Q08_2_Tachelhit_speaker,S02Q08_3_Tarifit_speaker,S02Q08_4_Tamazight_speaker,S02Q08_5_French_speaker,S02Q08_6_English_speaker,S02Q08_7_Spanish,S02Q08_8_Other_language,S02Q08_Other_languages_specified,S02Q09_Education,S02Q10A_Employment,S02Q10A_Employment_OTHER,S02Q10B_Unemployed_situation,S02Q11_Professional_field,S02Q11_Professional_field_OTHER,S02Q12_Professional_satisfaction,S02Q13_1_Profession_involves_work_with_customers,S02Q13_2_Profession_involves_work_with_colleagues,S02Q13_3_Profession_involves_work_on_PC,S02Q13_4_Profession_involves_pyhsical_labour,S02Q13_5_Profession_involves_intellectual_labour,S02Q13_6_Profession_involves_creative_work,S02Q13_7_ ...

  [1]: https://stackoverflow.com/a/19401318/4764604
  [2]: https://dba.stackexchange.com/a/253375/86822

Pied de page des forums

Propulsé par FluxBB