The Data Loader uses config files for facet creation, which has an HJson format (which is a more human friendly superset of Json). In the following chapters you can find the description of the attributes used in these files and some examples.
...
Facets config file
Sample file
Below is an example of a fully valid Hjson file which is not a valid Json. Notice how some of the keys/values are missing quotes and some rows are missing commas a the the end.
Code Block | ||
---|---|---|
| ||
{ "InteractionSubject": { "name": "Interaction Subjectinteraction_subject", "display_name": "Interaction Subject", "group_name": "Interactions", "visible": true, "searchable":true, "typeahead":true }, "InteractionType": { "name": "Type of Interaction interaction_type", "display_name": "Interaction Type", "group_name": "Interactions", "visible": true, "searchable":true, "typeahead":false }, "Date": { " "name": "creation_date", "display_name": "Date of creationCreation", "data_type": "datetime", "input_format_string": "%Y-%m-%dT%H:%M:%S", "default_value":"1900/01/01", "visible": true }, "EntittledUsersEntitledUsers": { "name": "users", "display_name": "Users", "auth": true, "auth_value_mandatory": true, "import": false }, "InternalAttendees": { "name": "attendees", "display_name": "Attendees", "group_name": "Interactions", "pivotal_group": "Members", "delimiter": ";", "visible": true }, "NoAtendees": { name "name": "number_of_attendees", "display_name": "Number of AtendeesAttendees", "data_type": "int", "visible": true, "searchable":false }, } |
Best Practices of Facet Naming
Follow the best practices for facet names and have a user friendly, nice looking name in the "display_name" but mind the maximum length mentioned below.
Best practices for the facet names:
- Only use lower case
- Use an underscore as a separator to join multiple words
- Avoid using space as a separator
- Avoid having any special characters in the facet name
Structure: Facet Keys and Facet Attributes
In the examples above, the curly brackets at the root of the file open a new dictionary. Within each dictionary there are a number of facet keys which, in turn have their own dictionary of key / value pairs - the facet attributes.
- Facet Keys are used to identify data elements in the data source the facets are being applied to, for example the column headings in an Excel spreadsheet.
- Facet Attributes are used to define the behaviour of the facet and how it shold be handled by Squirro. See the reference below for more details.
...
Note | ||||
---|---|---|---|---|
| ||||
Be careful using characters outside of the printable ASCII encoding range, such as umlauts (ü) or diacritics (é) in the facet key above. JSON files are normally encoded as UTF-8 while Excel, for example, will default to using ANSI encoding such as Windows-1252. That means if you use a value such as "Zürich" in a facet key in your JSON, it will only match the corresponding column in the input data if that data is also encoded as UTF-8. Recent versions of Excel 2016 can now export data to "CVS UTF-8" but if in doubt, simple restrict column names to characters in the printable ASCII range (i.e. avoid umlauts). |
Facet Attributes Reference
...