Nodes based on database views
Less than to read
Generating a node based on a database view involves setting up the view in the Views function (GESAVW).
The process to generate a node based on a database view is like the one used for database tables.
Once the view is created in X3, you can select Node (API) and fill-in the Node name (API) and the Package name (API):
On the lines, fill in the Property name. Optionally, you can configure:
- A Package name to generate the property as a node extension in another package.
- A Denormalized collection group to generate a denormalized node for the fields managed with dimensions in X3.
Note: The following technical fields are mandatory in the view definition for the generated node to be consistent and GraphQL queries to execute properly:
- CREUSR
- UPDUSR
- CREDATTIM
- UPDDATTIM
- UPDTCK
Setting up Property names for these technical fields is not needed and is not allowed in the Views function. The framework manages the Property names automatically.
You must define a unique index in the Views function. It is mandatory for the generated nodes to be consistent:
Once this setup is completed in the Sage X3 view, the GraphQL schema must be revalidated in the Node bindings function (GESANODEB). This must occur prior to the generation of packages in VS Code.