Document use of "trim" keyword in contents.yaml
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 22 Jun 2024 03:17:12 +0000 (22:17 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 22 Jun 2024 03:17:12 +0000 (22:17 -0500)
README.rst

index bf8c98ccd3feec59661c88c2f847df076ed9c4d2..b37cc9cbb366b50bc89c98658b3d6fdf67089f34 100644 (file)
@@ -46,7 +46,9 @@ The map file is in YAML syntax, which for purposes of this document
 can be thought of as a superset of JSON.  It must contain a top-level
 tag, `map_list`, which itself contains a list of maps, each of which
 maps a file to a table or view.  The table (or view) names may,
-optionally, be schema qualified.  An example map file might be::
+optionally, be schema qualified.  The "trim" key is optional, when
+omitted the trim setting from the user interface is applied.  An
+example map file might be::
 
   # This file is contents.yml
   map_list:
@@ -55,14 +57,17 @@ optionally, be schema qualified.  An example map file might be::
         file: foo.csv
         relation: foo_table
     # Load the bar.csv file into the bar_view uploadable-view of the default
-    # schema.
+    # schema.  Always trim leading and trailing whitespace from each column.
     - file_map:
         file: bar.csv
         relation: bar_view
+        trim: true
     # Load the baz.csv file into the baz_table table of the meta schema.
+    # Never trim leading and trailing whitespace from each column.
     - file_map:
         file: baz.csv
         relation: meta.baz_table
+        trim: false
 
 The files within each directory are uploaded in the order in which
 they are listed in the map file.  The directories in the zip file are