Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andi: Cannot Infer Schema with Many Columns #1265

Open
LtChae opened this issue Jul 8, 2021 · 1 comment
Open

Andi: Cannot Infer Schema with Many Columns #1265

LtChae opened this issue Jul 8, 2021 · 1 comment
Labels
bug Something isn't working dev tech debt UrbanOS

Comments

@LtChae
Copy link
Contributor

LtChae commented Jul 8, 2021

Andi fails to generate a schema for this file: Sample File

Steps to reproduce:

  • Create a dataset
  • Make it CSV format
  • Go to data dictionary section
  • Use the provided file to infer the schema

Debugging Notes:

  • Does not appear to be directly related to column #
    • Though cutting down the number of columns did eventually make it work somewhere around 70, changing the column headers to smaller values allowed it to work farther.
  • Does not appear to be related to the data
    • Tried it with all 1's in the columns as part of debugging
@LtChae LtChae added the bug Something isn't working label Jul 8, 2021
@LtChae
Copy link
Contributor Author

LtChae commented Jul 8, 2021

** (FunctionClauseError) no function clause matching in anonymous fn/1 in AndiWeb.EditLiveView.DataDictionaryForm.parse_csv/1                                                                                                                                                │
│     (andi 0.76.8) lib/andi_web/live/edit_live_view/data_dictionary_form.ex:339: anonymous fn({"OBJECTID"}) in AndiWeb.EditLiveView.DataDictionaryForm.parse_csv/1                                                                                                            │
│     (elixir 1.10.4) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2                                                                                                                                                                                                         │
│     (andi 0.76.8) lib/andi_web/live/edit_live_view/data_dictionary_form.ex:380: AndiWeb.EditLiveView.DataDictionaryForm.generate_new_schema/3                                                                                                                                │
│     (phoenix_live_view 0.14.8) lib/phoenix_live_view/channel.ex:213: anonymous fn/3 in Phoenix.LiveView.Channel.view_handle_event/3                                                                                                                                          │
│     (telemetry 0.4.2) /app/deps/telemetry/src/telemetry.erl:262: :telemetry.span/3                                                                                                                                                                                           │
│     (phoenix_live_view 0.14.8) lib/phoenix_live_view/channel.ex:102: Phoenix.LiveView.Channel.handle_info/2                                                                                                                                                                  │
│     (stdlib 3.13.2) gen_server.erl:680: :gen_server.try_dispatch/4                                                                                                                                                                                                           │
│     (stdlib 3.13.2) gen_server.erl:756: :gen_server.handle_msg/6                                                                                                                                                                                                             │
│ Last message: %Phoenix.Socket.Message{event: "event", join_ref: "10", payload: %{"event" => "file_upload", "type" => "hook", "value" => %{"file" => "OBJECTID,DOCUMENT_NBR,CRASH_REPORT_LINK,CRASH_YR,CRASH_MONTH_YEAR,DISTRICT_NBR,NLFID,NLF_JUR_CD,NLF_COUNTY_CD,COUNTY_LO │
│ G_NBR,ODOT_LATITUDE_NBR,ODOT_LONGITUDE_NBR,ODOT_FIPS_CD,AREA_CODE,CRASH_DATE,CRASH_SEVERITY_CD,CRASH_TYPE_CD,DAY_IN_WEEK_CD,DISTRACTED_DRIVER_IND,FACILITY_TYPE_CD,FHWA_RDWY_DEPARTURE_IND,FREEWAY_IND,FUNCTIONAL_CLASS_CD,HOUR_OF_CRASH,INCAPAC_INJURIES_NBR,INTERCHANGE_ID │
│ ,INTERSECTION_ID_CURRENT,INTERSECTION_LEG_ID,INTERSTATE_IND,INV_LOG_NBR,INV_NLFID,IS_COMMERCIAL_RELATED,LIGHT_COND_PRIMARY_CD,LOCAL_REPORT_NUMBER_ID,MAINTENANCE_AUTHORITY_CD,MONTH_OF_CRASH,NHS_CD,NO_INJURY_REPORTED_NBR,NON_INCAPAC_INJURIES_NBR,NUMBER_OF_UNITS_NBR,ODOT │
│ _CITY_VILLAGE_TWP_NME,ODOT_CRASH_LOCATION_CD,ODOT_DIR_FROM_REF_CD,ODOT_DIV_UNDIV_IND,ODOT_INTERSECTION_REL_IND,ODOT_LANES_NBR,ODOT_MAINTAINED_HWY_IND,ODOT_MILES_FROM_REF_NBR,ODOT_REF_ROUTE_PREFIX_CD,ODOT_YOUNG_DRIVER_IND,ODPS_ADDRESS_REFERENCE,ODPS_ALCOHOL_IND,ODPS_CI │
│ TY_VILLAGE_TWP_NME,ODPS_DRUG_IND,ODPS_LOC_DIR_SUFFIX_CD,ODPS_LOC_IN_WORK_ZONE_CD,ODPS_LOC_ROAD_DIRECTION_CD,ODPS_LOC_ROAD_NME,ODPS_LOC_ROAD_SUFFIX_CD,ODPS_LOC_ROUTE_ID,ODPS_LOC_ROUTE_PREFIX_CD,ODPS_LOC_ROUTE_SUFFIX_CD,ODPS_MILEPOST_REFERENCE,ODPS_MOTORCYCLE_IND,ODPS_R │
│ EF_DIR_SUFFIX_CD,ODPS_REF_DIRECTION_CD,ODPS_REF_GIVEN,ODPS_REF_POINT_USED_CD,ODPS_REF_ROUTE_ID,ODPS_REF_ROUTE_PREFIX_CD,ODPS_REF_ROUTE_SUFFIX_CD,ODPS_REF_SUFFIX_CD,ODPS_SCHOOL_ZONE_IND,ODPS_SENIOR_DRIVER_IND,ODPS_SPEED_IND,ODPS_TOTAL_FATALITIES_NBR,ODPS_TYPE_OF_WORK_Z │
│ ONE_CD,ODPS_WORK_ZONE_IND,OPER_ACCESS_", "fileName" => "extra 3 rows.csv", "fileSize" => 3221, "fileType" => "text/csv"}}, ref: "25", topic: "lv:data_dictionary_form_editor"}

@ksmith-accenture ksmith-accenture added dev On Hold Assigned to cards who were originally under the column titled 'On Hold' and removed On Hold Assigned to cards who were originally under the column titled 'On Hold' labels Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev tech debt UrbanOS
Projects
None yet
Development

No branches or pull requests

2 participants