# .csv upload for bulk user custom field changes

**URL:** https://meta.discourse.org/t/csv-upload-for-bulk-user-custom-field-changes/218619
**Category:** Feature
**Created:** [February 17, 2022, 9:38pm UTC](https://meta.discourse.org/t/csv-upload-for-bulk-user-custom-field-changes/218619 "2022-02-17T21:38:48Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [March 21, 2022, 11:10pm UTC](https://meta.discourse.org/t/csv-upload-for-bulk-user-custom-field-changes/218619/5 "2022-03-21T23:10:34Z")

</div>

Jay has delivered the goods:

[https://github.com/pfaffman/import-user-fields-from-csv](https://github.com/pfaffman/import-user-fields-from-csv)

It requires some competence with Linux / Bash in order to use it, and I’d strongly recommend doing a backup first and doing it at a quiet time as you can royally stuff up your user data if not careful. I trialled it on a staging server before using it on our production site.

You might find this [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query useful in order to get the existing data for the `user_field` that you are targeting:

```plaintext
--[params]
-- string :ucf_name = user_field_1

SELECT
    user_id, value as ":ucf_name"
    
FROM user_custom_fields

WHERE name = :ucf_name
ORDER BY user_id asc

```

Note that you’ll have to remove the `'` from either side of the field name in the .csv as I couldn’t work out how to stop the query including them.

---

_[View the full topic](https://meta.discourse.org/t/csv-upload-for-bulk-user-custom-field-changes/218619)._
