Numeric Data Types and CSV Import?


Do numeric data types like integer and timestamp (via Numeric Data Types) work with CSV Imports? If so, I can’t figure out how as I’m just getting literal text.

If not, should I be accomplishing this data type by way of the Batch edit -> Convert to numeric workflow? I’ve tried this as well and it doesn’t seem to have an effect, or at least the thing I wanted to happen didn’t happen.

Also, here’s what a job looks like when I try to do this batch edit to change to numeric. I’m trying to apply this change across all of the items that use this resource template. To me, it looks suspiciously like nothing is happening:

    "resource": "items",
    "query": {
        "resource_template_id": "3"
    "data": [],
    "data_remove": [],
    "data_append": []
[no log]

The next version of CSVImport will add pluggable data type support; the next version of NumericDataTypes will plug in to it. I’m not sure exactly when they’ll be released, but it shouldn’t be too long.

There’s a bug in NumericDataTypes that breaks “Convert to numeric” when batch editing all. It’s fixed in the next release.

OK, thanks! I’ll keep an eye out for those releases.

In the meantime, would it a reasonable workaround be to go into the SQL table and run an update there to change the “type” from “literal” to “numeric:integer” on relevant rows? I’m hesitant to go into the database like that but I really need to get this working.

Don’t do that. Much of the module’s functionality depends on parallel data in the number tables that the module manages. Whereas the value table contains ISO 8601 formatted strings, the number tables contain the corresponding timestamps.

I believe batch edit selected still works, so you could process your items by hand, one page at a time. Even so, I’ll see if we can expedite the releases.

Thanks! Batch editing selected items did indeed work, so I just changed the site settings so the number of search results matched all the items I needed to change.