On Sat, 30 Sep 2023 08:50:45 -0700 Adrian Klaver wrote: >On 9/30/23 07:01, pf@xxxxxxxxxxx wrote: >> Hi Adrian,On Fri, 29 Sep 2023 14:27:48 -0700 Adrian Klaver wrote: >> >>> On 9/29/23 1:37 PM, pf@xxxxxxxxxxx wrote: >>>> Hi, > >>> I'm going to say it is the >>> >>> ( -- import only a subset of columns >>> >>> I suspect the -- comment is the issue. >> >> I wish it was that easy. It's not in the code; I added that as a >> clarification within the email only. >> >>> You need to show the actual Python code for a more complete answer. >> >> Attached... >> >> Source file (44,530 records): >> https://s3.amazonaws.com/dl.ncsbe.gov/data/ncvoter53.zip >> Attached is a 10 row (incl. header) sample file. > >I am not seeing the sample file. Sorry; I think I hit CTRL+Enter which sent that message before I was done. Then, I was outside with the HVAC guy repairing my heat pump... Python script and sample file attached... Invoke it with: "dbcopy_voter2 <source> <db> <table> <db_pw>" e.g.: >> $ dbcopy_voter2 /tmp/ncvoter53_10.txt test ncv53 <db_password> > >Not sure what the above is supposed to be doing? Importing the data via a COPY. >What I was looking for is the Python code snippet where you actually run >the COPY. Attached this time... Again, sorry about the incomplete message earlier. >Also per Tom's post information on whether there are extensions >installed or if there is an event trigger running? Replied to Tom. Thanks, Pierre
Attachment:
dbcopy_voter2
Description: Binary data
"county_id" "county_desc" "voter_reg_num" "ncid" "last_name" "first_name" "middle_name" "name_suffix_lbl" "status_cd" "voter_status_desc" "reason_cd" "voter_status_reason_desc" "res_street_address" "res_city_desc" "state_cd" "zip_code" "mail_addr1" "mail_addr2" "mail_addr3" "mail_addr4" "mail_city" "mail_state" "mail_zipcode" "full_phone_number" "confidential_ind" "registr_dt" "race_code" "ethnic_code" "party_cd" "gender_code" "birth_year" "age_at_year_end" "birth_state" "drivers_lic" "precinct_abbrv" "precinct_desc" "municipality_abbrv" "municipality_desc" "ward_abbrv" "ward_desc" "cong_dist_abbrv" "super_court_abbrv" "judic_dist_abbrv" "nc_senate_abbrv" "nc_house_abbrv" "county_commiss_abbrv" "county_commiss_desc" "township_abbrv" "township_desc" "school_dist_abbrv" "school_dist_desc" "fire_dist_abbrv" "fire_dist_desc" "water_dist_abbrv" "water_dist_desc" "sewer_dist_abbrv" "sewer_dist_desc" "sanit_dist_abbrv" "sanit_dist_desc" "rescue_dist_abbrv" "rescue_dist_desc" "munic! _dist_abbrv" "munic_dist_desc" "dist_1_abbrv" "dist_1_desc" "vtd_abbrv" "vtd_desc" "53" "LEE" "000030002652" "CL31767" "AARON" "BARBARA" "M" " " "R" "REMOVED" "RD" "DECEASED" "REMOVED" "" "" "" " " " " " " " " " " " " " " "" "N" "10/02/2000" "B" "NL" "DEM" "F" "1953" "70" "MD" "N" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "53" "LEE" "000030036973" "CL60219" "AAZAMI" "KIARASH" "" "" "I" "INACTIVE" "IU" "CONFIRMATION RETURNED UNDELIVERABLE" "2111 WIMBERLY WOODS DR " "SANFORD" "NC" "27330" "2111 WIMBERLY WOODS DR" "" "" "" "SANFORD" "NC" "27330" "8189153666" "N" "09/14/2016" "O" "UN" "UNA" "M" "1972" "51" "" "Y" "D1" "PRECINCT D1" "01" "SANFORD" "1" "WARD #1" "09" "11A" "11" "12" "051" "4" "COMMISSION 4" "1" "WEST SANFORD" "" "" "" "" "" "" "" "" "" "" "" "" "01" "SANFORD" "12" "12TH PROSECUTORIAL" "D" "D" "53" "LEE" "000030036974" "CL60220" "AAZAMI" "LINDSAY" "LYNETTE" " " "R" "REMOVED" "RM" "REMOVED AFTER 2 FED GENERAL ELECTIONS IN INACTIVE STATUS" "REMOVED" "" "" "" " " " " " " " " " " " " " " "" "N" "09/14/2016" "W" "UN" "REP" "F" "1984" "39" "" "Y" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "53" "LEE" "000030002228" "CL31343" "ABARCA" "HUGO" "J" "JR" "I" "INACTIVE" "IN" "CONFIRMATION NOT RETURNED" "809 AMHERST RD " "SANFORD" "NC" "27330" "809 AMHERST RD" "" "" "" "SANFORD" "NC" "27330" "9197770446" "N" "07/24/2000" "O" "NL" "DEM" "M" "1980" "43" "IL" "Y" "A2" "PRECINCT A2" "" "" "" "" "09" "11A" "11" "12" "051" "1" "COMMISSION 1" "2" "EAST SANFORD" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "12" "12TH PROSECUTORIAL" "A" "A" "53" "LEE" "000030019012" "CL47087" "ABARCA" "SOPHIA" "" "" "A" "ACTIVE" "AV" "VERIFIED" "317 CHURCH ST " "SANFORD" "NC" "27330" "317 CHURCH ST" "" "" "" "SANFORD" "NC" "27330" "9197215455" "N" "09/10/2008" "O" "HL" "REP" "F" "1989" "34" "IL" "Y" "A1" "PRECINCT A1" "01" "SANFORD" "4" "WARD #4" "09" "11A" "11" "12" "051" "1" "COMMISSION 1" "1" "WEST SANFORD" "" "" "" "" "" "" "" "" "" "" "" "" "01" "SANFORD" "12" "12TH PROSECUTORIAL" "A" "A" "53" "LEE" "000030039023" "CL61374" "ABARCA" "TOMASA" "MENDOZA" "" "I" "INACTIVE" "IN" "CONFIRMATION NOT RETURNED" "809 AMHERST RD " "SANFORD" "NC" "27330" "809 AMHERST RD" "" "" "" "SANFORD" "NC" "27330" "9193564793" "N" "11/08/2016" "W" "HL" "LIB" "F" "1981" "42" "" "Y" "A2" "PRECINCT A2" "" "" "" "" "09" "11A" "11" "12" "051" "1" "COMMISSION 1" "2" "EAST SANFORD" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "12" "12TH PROSECUTORIAL" "A" "A" "53" "LEE" "000030048749" "CZ106255" "ABAY-ABAY" "CHRISTINE" "SUSAN" "" "A" "ACTIVE" "AV" "VERIFIED" "2149 LOWER MONCURE RD " "SANFORD" "NC" "27330" "2149 LOWER MONCURE RD" "" "" "" "SANFORD" "NC" "27330" "" "N" "05/11/2020" "W" "NL" "DEM" "U" "1991" "32" "" "Y" "A2" "PRECINCT A2" "" "" "" "" "09" "11A" "11" "12" "051" "2" "COMMISSION 2" "2" "EAST SANFORD" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "12" "12TH PROSECUTORIAL" "A" "A" "53" "LEE" "000030014928" "CL43691" "ABBEY" "DALE" "ALAN" " " "R" "REMOVED" "RD" "DECEASED" "REMOVED" "" "" "" " " " " " " " " " " " " " " "" "N" "01/26/2007" "W" "NL" "DEM" "M" "1939" "84" "NY" "Y" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "53" "LEE" "000030046131" "CZ85838" "ABBONDANZIO" "JODIE" "LEE" "" "A" "ACTIVE" "AV" "VERIFIED" "171 PEACEFUL LN " "SANFORD" "NC" "27330" "171 PEACEFUL LN" "" "" "" "SANFORD" "NC" "27330" "" "N" "08/27/2019" "U" "UN" "UNA" "U" "1992" "31" "" "Y" "B2" "PRECINCT B2" "01" "SANFORD" "2" "WARD #2" "09" "11A" "11" "12" "051" "2" "COMMISSION 2" "1" "WEST SANFORD" "" "" "" "" "" "" "" "" "" "" "" "" "01" "SANFORD" "12" "12TH PROSECUTORIAL" "B" "B"