ash_csv v0.8.1 AshCsv.DataLayer View Source

The data layer implementation for AshCsv

Table of Contents



csv do
  file "priv/data/tags.csv"
  create? true
  header? true
  separator '-'
  columns [:id, :name]

  • :file - Required. The file to read the data from

  • :create? - Whether or not the file should be created if it does not exist (this will only happen on writes) The default value is false.

  • :header? - If the csv file has a header that should be skipped The default value is false.

  • :separator - The separator to use, defaults to a comma. Pass in a character (not a string). The default value is 44.

  • :columns - The order that the attributes appear in the columns of the CSV

Link to this section Summary

Link to this section Functions