Import / Export Feature Data
Overview
Features
During the import, all data imported to Perfion is related to features and thus, it is important to understand what features are, how they are created and what properties they may have.
Features are data objects in Perfion, which has specific base data type, general properties, data properties and may have various advanced properties. Features can also have different configurations, which allows creating relations from one feature to another.
Feature Base Data Types
Feature base data types are related to the type of the data stored within feature. The type can be Number, Date, Text, etc. In case feature data is imported, then it is important to define data so, that each data is valid based on its base data type. When importing feature data Perfion will validate incoming data based on each feature’s data type and will reject data, which have incorrectly defined values or even stop the import.
Table below shows feature base data types supported by feature data import.
Compound | Table | Search | Date | File | Image | Link | Number | String | Text |
No | Yes |
Compound data type is considered as deprecated and it is not supported.
Feature data import support only simple data types. Table and Search data types are complex types and require more than one value to be created and thus are not supported.
Specifications for data types are shown in the table below.
Feature base data type | Specifications |
Date | Date in the local PC culture. |
File | Binary data, e.g. any type of file. |
Image | Image file. Supported image formats: BMP, GIF, JPG/JPEG, PNG, TIFF/TIF, EPS, PSD, PDF, SVG, WEBP, AVIF |
Link | Simple text, max 255 chars. |
Number | Integer or decimal number, e.g. “5”, “5.5”, etc. The value is saved in float format and supports numbers in range: [-3.402823e38 3.40282347E+38] The number data format will depend on local PC culture. |
String | Text, max 255 chars. |
Text | Text without limit. Even if there is no fixed limit how many characters there can be saved, the size of text type data depends on other limits, e.g. available memory size allocated in database for such data type. This limit is not fixed, but indicative size is around one million bytes. |
Table | Table data type is a special complex type which is used with Perfion TableDesigner. Feature data import does not support this data type. |
Search | Search data type is a special complex type which is used to store Perfion queries. These queries then can be used in various places in Perfion as feature filter, feature view, etc. Feature data import does not support this data type. |
Compound | Deprecated data type, which is not supported by feature data import. |
Refer to Figure 1 to see how feature base types are organized in Perfion.
Date and Number Data Format
The import data formats for Number and Date type features when defined in the import data will be handled based on how they are defined and which culture is used to run the import.
The import can run directly from Perfion Windows client, but it could also be executed from Actions, Web Client, Application Server and other external sources. The local PC culture settings will be used by default based on where the import runs, so it is important to match the import data to that PC culture or to define the custom import data culture.
The Date and Number type feature data can be defined in several ways using different types of import data files and there is also a special import parameter which allows overwriting the current PC culture.
String/text data. If the import data for Number and Date type features is defined as a simple string/text, then the import will use the culture to parse string/text values in order to convert data to actual values which will be used in the import. The string/text values in this case should match the formatting supported by the chosen culture:
Using local PC culture. If the custom import data culture is not defined, then by default the local PC culture will be used where the import is running from.
Using custom culture defined via import parameter. If the custom import data culture is defined, then it will be used for all incoming data when parsing it.
Strong type data. If the import data for Number and Date type features is imported from XML file with schema which defines number and date values as ‘double’ and ‘date’ accordingly, then the import will take this into account and will handle the incoming data in culture invariant way. In this case local PC culture or culture defined via import parameter will not have any effect on this data and it will be imported correctly. Note that when importing data from Excel file it should work in a similar way like using XML file with schema, e.g. if the data in the Excel is defined correctly to be of numeric and date types accordingly.
Feature General Properties
Feature general properties defines feature ID, unique name, caption, how and where feature will be shown in Perfion, etc. Refer to Figure 2 to see available feature properties.
The most important property to know for feature data import is feature’s unique name. Unique name will be used to identify features in the import data.
Feature Data Properties
Feature data properties define how features will behave, how and where the actual feature data will be stored, etc. Refer to Figure 2 to see available feature data properties.
There are many data properties and several can be chosen for the same feature. For example, feature can be selectable with sortable multi-value data and that data can also be localizable. The terminology used when describing features will be derived from data property names and therefore, the before mentioned feature, can be called “selectable” feature, “multi-value” feature, “localizable” feature, etc.
Feature data property | Description |
Explicit | The explicit property does not exist, but all features, which does not have selectable data property are called explicit. Explicit feature has its own data value(s) saved in the feature itself. This is the most basic feature. |
Selectable | The selectable data property means that a user can select the value(s) from a list of items instead of typing the value. The list of items can be maintained in feature data and if a value is edited, the change is immediately reflected on all items it is assigned to. The import to selectable features differs from import to explicit features. These differences will be explained in more details in other sections of this manual. |
Selectable with hierarchy (Allow Hierarchy) | If feature is defined to allow hierarchy, then one can define hierarchy for feature’s items. Hierarchy can be defined only if feature has Selectable data property. |
Selectable with custom ordering (Custom Ordering) | Custom ordering controls the native order of selectable items and should be set when you don’t want grid view alphabetically sorted by columns. It is primarily used for categorizers (left hand side) or drop downs where a custom order is desired. Custom ordering can be defined only if feature has Selectable data property. |
Selectable with sortable related items (Sortable Related Items) | Sortable related items are used to control multi-value ordering and overrides custom ordering. Note that the flag is set on the categorizer (left hand side) – not on the item that you want to sort. Its primary use is for output channels where you want to control the order in multiple categories so an item can have different order in different outputs. Sortable related items can be defined only if feature has Selectable data property. If feature has this property, then related sort orders can be exported and imported for selected feature item, for all selected feature items or for all features in Perfion which has this data property. |
Localizable | The Localizable data property defines that feature have different values depending on localization. Localization can also be understood as language/dialect. Example: let’s say there is a string type explicit feature, which describe product colors and this feature is localizable. Then, this feature will have one value for each language, which are defined for Perfion user. For example, if there are “English (en)” and “Danish (dan)” languages specified in Perfion, then localizable feature will have not one value, but two: one for English and one for Danish language. |
Inheritable | Feature with Inheritable data property allows feature values to be inherited. For example, if feature items have hierarchy and if feature has value defined for higher lever hierarchy item, then lower hierarchy level items will not have their own value, but instead will inherit the value from higher hierarchy level. |
Formula | Formula data property is available only with Text and String type features. Formula is a special property, which allows creating custom data using values from other features by using templates. Features with Formula data property can be used to import data to, but it cannot be used as import key feature. |
Multi-value (Allow Multiple) | Features with Multi-value data property allow to store multiple values. If feature is explicit multi-value feature, then one can save multiple values instead of one. If feature is selectable multi-value feature, then one can select multiple values from selectable feature’s default values instead of one. If feature is localizable multi-value feature, then each feature’s value will also have localizable value for each locale (e.g. language). For example, if feature have three values and three locales, then this feature will have nine values in total. |
Multi-value sortable (Sortable) | The feature is almost the same as multi-value feature (e.g. have the same data structure), but the difference is, that all values have order. That means, that the order of existing values will not change after adding new values. The multi-values without order in most cases will be sorted alphabetically, while the sortable multi-values will be order by their predefined order. |
Feature data import depends on data properties and will use different methods to correctly handle incoming data. Therefore, it is important to understand how to define import data in order to import it correctly. Not all data properties can be used in feature data import. The table below shows which data properties are supported.
Data property | Supported |
Explicit | Yes |
Inheritable | Yes |
Localizable | Yes |
Advanced properties | Yes |
Validation properties | Yes |
Formula | Yes |
Multi-value (Allow Multiple) | Yes |
Multi-value sortable (Sortable) | Yes |
Selectable | Yes |
Selectable with hierarchy (Allow Hierarchy) | Yes |
Selectable with custom ordering (Custom Ordering) | No |
Selectable with sortable related items (Sortable Related Items) | No |
Feature Remote Properties
Remote properties allows changing feature type from a normal feature to a remote feature. One can also specify remote feature data source and other parameters.
Remote features are read only features, which have data retrieved from remote data sources. Data can be obtained from remote web service, database or OData service. These features cannot be used to import data into, because their data does not exist in Perfion. Each time remote feature data should be shown anywhere in Perfion, the data is retrieved from remote data source. One can know if the feature is remote by checking “Remote” section in “Feature Definition” window (refer to Figure 2). If data fields are blank, then the feature is not a remote feature.
Feature data importer does not support remote features.
Import Feature
Import feature is a feature selected to import data or configurations to. Import feature can be a simple or a base feature. Import feature selection defines the scope of import for data import. By choosing a feature, which will be used to import data to, one can achieve different import goals. For example, by selecting a simple selectable feature as import feature one can import default values to selectable feature. If base feature is selected as import feature, one can import data to multiple features at the same time e.g. to import data into import feature items.
Note that only selectable features can be used as an import feature.
In Figure 3 it is shown how base feature “Product” is selected as import feature.
Import Feature Items
Import feature items are data records for that feature.
If import feature is a simple feature, then it will have only one value per item, which will be import feature’s value.
If import feature is a base feature, then item will have import feature’s value, as it was with simple feature, and additionally it will also have one value per each feature related to base feature. For example, from Figure 3 the Import feature “Product” items will consist of: “Product” feature value (this is import feature’s value), “Item Number” feature value, “Image” feature value, etc.
NOTE: In Perfion item values are optional, e.g. they do not have to be defined. In practice, the base type import feature may have many features in its configuration, but the actual values for each item will be defined only by existing values.
Item Hierarchy
Feature items may have hierarchy and only lowest level hierarchy items will be used as feature items (normal items). All other (higher hierarchy level) items are called virtual items. Virtual items have the same properties and may have the same values as normal items, but they are only used for configuration of normal items and in most cases with inheritable features. For example, one can define default value common for several normal items by using only one virtual item and inherited feature. Refer to Figure 4 to see how this works.
NOTE: Only normal items will be used in reports or other places, while virtual items are only used for normal item specification.
Import allows configuring item hierarchy levels by using “_parent” keyword in feature data import. Refer to Parent feature for details.
Item Inheritance
Item inheritance is used to allow easier definition of item values, where multiple items may have the same value. For example, from Figure 4 items “Normal item 2” and “Normal item 3” could be described as two variants of the same product (e.g. car). Since all variants of the same product are made by the same manufacturer, the value could be defined only once by grouping all product variants under higher hierarchy item (“Virtual item 2” item) and specifying value there instead of doing this for each product variant item.
Inheritable feature value from higher hierarchy will overwrite any feature values for lower hierarchy level items, even if they had some values before. Moreover, if inherited feature value is specified for higher hierarchy level item, then one cannot define inherited feature values for lower hierarchy level items. The values will be always taken from higher hierarchy level items. The same rules applies also in feature data import. One cannot import values to lower hierarchy level items, if there exist higher level hierarchy items with existing not empty value for selected feature.
The only exception is when higher hierarchy level item does not have any value specified, e.g. the value is empty. Then all lower hierarchy level items will not be overwritten to empty values, but instead one will get possibility to specify independent values for each item, like if it was not inherited feature.
- 1 Overview
- 1.1 Features
- 1.2 Feature Base Data Types
- 1.3 Feature General Properties
- 1.3.1 Feature Data Properties
- 1.3.2 Feature Remote Properties
- 1.4 Import Feature
- 1.5 Import Feature Items
- 1.5.1 Item Hierarchy
- 1.5.2 Item Inheritance
Read more: