CKAN DataStore User Attributes
Readers: For information on the parameters in this dialog that are common to all readers, see:
Writers: For information on the parameters in this dialog that are common to all writers, see:
User attributes for this format are defined below.
Name |
The field name for a column in CKAN. This should not contain any SQL offensive characters and should be less than 32 characters in length. Note Underscores “_” should not be used at the beginning of names.
|
Type |
The type of a column in a table. Unless absolutely required by the specific CKAN instance limitations, it is best not to specify types with width limits. For example, a char(width)/varchar(width) type can be specified as a text type, and numeric types can be used without specifying width/precision. bit This type is used to represent a fixed-length bit string. Bit strings are strings of 1's and 0's. They can be used to store or visualize bit masks. bool This type is used to represent Boolean values. This type can have one of two states: "true" or "false". bytea This type is used to represent binary strings (a “byte array”). A binary string is a sequence of octets (or bytes). Unlike character strings, binary strings allow storing octets of value zero and other non-printable octets (outside the range 32 to 126). char This type is used to represent fixed-length, space padded strings of the specified width. Storing character strings longer than the specified length will result in an error unless the excess characters are spaces, in which case the string will be truncated to the maximum length. If the string to be stored is shorter than the declared length, the value will be space padded. date This type is used to represent a calendar date (year, month, day). The oldest date that can be represented is 4713 BC and the latest date is 5874897 AD. The resolution is 1 day. float4 This type is used to represent a single precision floating point number. It has 6 decimal digits of precision. This type is an inexact type. This means they are stored as an approximation and may result in slight discrepancies. The typical range is around 1E-37 to 1E+37. (Note that FME does not yet support the special floating point type values such as Infinity, -Infinity, and NaN.) float8 This type is used to represent a double precision floating point number. It has 15 decimal digits of precision. This type is an inexact type. This means they are stored as an approximation and may result in slight discrepancies. The typical range is around 1E-307 to 1E+308. (Note that FME does not yet support the special floating point type values such as Infinity, -Infinity, and NaN.) int2 This type is used to represent signed, 2-byte integers. The range is -32786 to +32767. This is typically used for small range integers, and generally only used if disk space is at a premium. int4 This type is used to represent signed, 4-byte integers. The range is -2147483648 to +2147483647. This is typically the usual choice for integers as it offers the best balance between range, storage size, and performance. int8 This type is used to represent signed, 8-byte integers. The range is -9223372036854775808 to +9223372036854775807. This is typically only used if the integer range of int4 is not sufficient. This may not function correctly on all platforms as it relies on compiler support for eight-byte integers. If the machine does not have this support, this acts the same as int4 but takes up eight bytes of storage. json This type is used to represent JSON documents which enforce that each stored value is valid according to the JSON rules. The JSON data type stores an exact copy of the input text, which processing functions must reparse on each execution. jsonb This type is used to represent JSON documents which enforce that each stored value is valid according to the JSON rules. The JSONB data type is stored in a decomposed binary format which is significantly faster to process, since no reparsing is needed. money This type is used to represent a currency amount with a fixed fractional precision. The range is -21474836.48 to +21474836.47. numeric This type is used to represent an exact numeric of selectable precision. It can store up to 1000 digits of precision. It is recommended for monetary amounts or other quantities where exactness is required. This type also supports the special value NaN meaning “Not a Number”. oid This type is used to represent a numeric object identifier. It is currently implemented as an unsigned four-byte integer. Its use as a primary key in a user-created table is discouraged. OIDs are best used only for references to system tables. serial This type is used to represent an auto incrementing four-byte integer. The range is 1 to 2147483647. This is similar to specifying an integer column that has default values to be assigned from a sequence generator. It also has a NOT NULL constraint applied to it. text This type is used to represent a variable length character string. time This type is used to represent a time of day without time zone. The low value is 00:00:00 and the high value is 24:00:00 with a resolution of 1 microsecond. timestamp This type is used to represent a date and time without time zone. This stores both the date and time. The low value is 4173 BC and the high value is 5874897 AD with a resolution of 1 microsecond. uuid This type is used to represent Universally Unique Identifiers (UUIDs). These identifiers are 128-bit values generated by an algorithm. A UUID is a sequence of lower-case hexadecimal digits in several groups separated by hyphens. Specifically, it is a group of 8 digits, followed by three groups of 4 digits, followed by a group of 12 digits. An example of a UUID in this standard form is a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11. varbit This type is used to represent a variable-length bit string. varbit(width) This type is used to represent a variable-length bit string with specified limit. varchar(width) This type is used to represent variable-length strings of the specified limit. xml This type is used to represent xml data. The advantage of this choice is that it checks the input values for well-formedness. |
Index |
Primary key (PrimaryKey) indexing is supported when creating tables with the writer. Multiple columns can be specified to form a single primary key. If a primary key is not specified during table creation, CKAN will use an internal primary key column of _id, which is used by the reader as the format attribute ckandatastore_row_id. Upsert/Update operations are not available for use on this table. If a column has been specified as a primary key column, the corresponding attribute values should not contain Null/missing values; otherwise, the translation will fail. |