User-defined custom properties
For each object in Hackolade, we've defined a set of standard properties that appear in the properties pane. But it is possible that your organization wants to define and track its own metadata properties for models, containers, entities, and attributes. This could be for data governance reasons, and/or to leverage properties in code generation, etc...
Hackolade provides a no-code approach so you can create and maintain custom properties simply by editing JSON configuration files. These files are found in folders in C:\Users\%username%\.hackolade\options (on Mac in Users/$USER/.Hackolade/options) which can be Git-enabled to be shared across an organization if desired.
Warning: For the changes to take effect, it is required to exit Hackolade and restart it.
Customization for native targets (JSON, Couchbase, DynamoDB, and MongoDB) do not require to download a special plugin.
1) Access the target customization directory
To create and maintain custom properties for a given target, you access the folder structure from Help > Plugin Manager
and choose the Installed tab:
then click on the Show plugin customization directory link for the chosen target. This link opens up a Windows Explorer or Mac Finder session in the corresponding folder. If the folder does not yet exist, it will be automatically created, along with all the necessary configuration files.
For each custom properties plugin, you will find a directory structure similar to this one:
i) it is always necessary to restart the application after having saved changes, and before you can see these changes reflected in the properties pane.
ii) for field-level definitions, since data types have different property lists, it may be necessary to define custom properties for multiple data types.
As a reminder, terminology differs between NoSQL databases:
- container means: dbs in MongoDB, region in DynamoDB, and bucket in Couchbase, namespace in Avro, keyspace in Cassandra, etc...
- entity means: collection in MongoDB, table in DynamoDB and Cassandra, and document kind in Couchbase,e tc...
- field means: field in MongoDB and Couchbase, and attribute in DynamoDB, column in Cassandra, etc...
You need to edit the corresponding <object>LevelConfig.json file to add custom properties.
3) Lower tabs
For each level, the Hackolade properties pane may have one or more lower tab:
- MongoDB model lower tab:
- MongoDB dbs lower tab:
- MongoDB collection lower tab:
- MongoDB field lower tab:
If the level allows multiple tabs, you need to choose to which lower tab you want to add properties.
4) Property types
The following controls are possible for user-defined properties:
- simple text: one line of text
- text area: popup for multi-line text entry
- dropdown selection (unique) from a defined list of options
- dropdown selection (multiple) from a defined list of options
- numeric-only field
- checkbox: for true/false entry
- group: addition of a set of properties of given control type
- field list: selection from list of fields
- field list with attributes: selection from list of fields with attributes
More information here.
5) Property definition
Examples are provided in the comments section of each config file. Here's an overview of the schema:
Here's another view, consolidated:
- propertyName: mandatory, this is the property label that will appear in the Property Pane
- propertyKeyword: mandatory, this is the unique key for the property
- shouldValidate: optional, boolean true/false to define whether to validate the regular expression of the text input [default: false]
- propertyTooltip: optional, in the case of input types textarea and select, it is possible to display a tooltip defined here
- propertyType: mandatory, this is the control definition, with possible values: text, details, select (i.e. dropdown), checkbox
- options: optional, this is the array of possible checkbox options
- template: optional, this is needed in the case of propertyType = details, to define a popup multi-line text. Possible value: textarea
- valueType: optional, this is needed in to specify that a property is numberic only. Possible values: numeric
6) Share customization with team members
it is recommended that you share customization using Git. Store your changes in a Git remote repository, and have your team members clone it locally in C:\Users\%username%\.hackolade\options (on Mac in Users/$USER/.Hackolade/options) That way, all that teams members need to do is to pull regularly, and they will get your latest changes.
For the changes to take effect on each computer, it is required to exit Hackolade and restart it.