18F / open-data-maker

make it easy to turn a lot of potentially large csv files into easily accessible open data
Other
199 stars 135 forks source link

allow for multiple null_value mappings in the data dictionary #316

Open kynetiv opened 8 years ago

kynetiv commented 8 years ago

This PR addresses the need for multiple field values to map to a NULL value in the API. This is related to 18F/college-choice#903.

Currently, config.null_value and map_column_types methods only allow for a single string value in the data dictionary to be mapped to null when encountered in the csv data during import. The default has been the string "NULL" if no data dictionary entry was found.

This PR allows for the null_value to be defined as an array OR a single entry when the column type's are mapped and will give more flexibility for other field value instances that should be mapped to null.