Difference between revisions of "Data Dictionaries"

417 bytes added ,  02:43, 9 March 2022
Add table of CKAN types
(Add Data Dictionaries page)
 
(Add table of CKAN types)
Line 18: Line 18:
* "column": The name of the field. (Preferably formatted in all lowercase letters and with underscores instead of spaces or other punctuation.)
* "column": The name of the field. (Preferably formatted in all lowercase letters and with underscores instead of spaces or other punctuation.)
* "type": The type of the field, coded as something like "text" or "float" or "int". The [http://docs.ckan.org/en/latest/maintaining/datastore.html#field-types full list of types for values that go into the CKAN datastore] (which the WPRDC data portal runs on) is
* "type": The type of the field, coded as something like "text" or "float" or "int". The [http://docs.ckan.org/en/latest/maintaining/datastore.html#field-types full list of types for values that go into the CKAN datastore] (which the WPRDC data portal runs on) is
   
{| class="wikitable"
 
|+
|-
! CKAN type !! description
|-
| text || text string
|-
| int || integer
|-
| float || real number
|-
| boolean || a Boolean value (True or False)
|-
| date || a date without a time
|-
| time || a time without a date
|-
| timestamp || a date and a time together (a.k.a., a "datetime")
|-
| json || a JSON representation of some data (superuseful but by far the most obscure type on this list)
|}
Note that when using CKAN's integrated data dictionaries, the type of a data dictionary entry is set by the type of the field in the CKAN datastore, so you shouldn't have to set this yourself (unless you need to override the type that CKAN thinks that field is [this is only for a non-ETL upload]).
Note that when using CKAN's integrated data dictionaries, the type of a data dictionary entry is set by the type of the field in the CKAN datastore, so you shouldn't have to set this yourself (unless you need to override the type that CKAN thinks that field is [this is only for a non-ETL upload]).