Last active
August 8, 2020 23:25
-
-
Save noelworden/f1a7453ba3e99813867255d2814606ae to your computer and use it in GitHub Desktop.
#blog_snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ["path", "to", "file"] | |
| |> CSVUtil.data_from_csv() | |
| |> Enum.each(fn attrs -> | |
| %Product{} | |
| |> Product.changeset(attrs) | |
| |> Repo.insert!() | |
| end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment