How to create Models

We talked a little in this article about how Kondado deals with data transformation, and why we believe that our model creation functionality simplifies and speeds up your information flow.

Once you have created your integration through Kondado, and want to transform the data in your target database, by creating a model you will create a new table in your database, which will be updated whenever your trigger (integration or other model) is executed, and will ensure that your data is always transformed and fresh.

Creating models

To create a model in Kondado, follow the steps below:

1) Access the models page on the Kondado platform

2) Click on “New Model”;

3) Give a name to your model and click on “Save”;

4) At this point, you will be directed to the model creation and editing page. On the left side of the screen will be all the model settings, we explain a little more about them below:

Screenshot from 2023-07-21 10-13-03.png
  • Name: Name of the model that you defined in the previous step.
  • Active?: Indicates whether your model is active. After finishing all the model settings, it is important to make sure that this field is marked as “Yes”, so that your model is executed whenever a trigger is executed. This field should be marked at the end of all edits.
  • Table name: Here you define the name that the table generated by the model will have in your database. Remember that you must follow the same table name pattern of your bank, spaces and accents are not allowed.
  • Destination: When clicking on this setting you will be presented with a list of all your destination banks registered in Kondado, you should choose in which bank you want to create the new table (it is important that the tables that will be consulted in the model are in the destination bank).
  • Triggers: Here you should choose which integrations or models will trigger the execution of your new model. That is, as soon as these triggers are executed your model will automatically be updated. You can have up to 10 triggers for each model.
  • How to trigger: In this setting you can choose whether the model will run only after all the triggers defined in the previous step are executed, or if just the execution of one of the triggers will be enough for the model execution.
  • Interval between executions: Here you define what the minimum interval time between the model executions is. For example: if you select two triggers that are executed every 5 minutes, but you want your model to be triggered only at an interval of 30 minutes, when selecting the interval the model will be triggered only after this time.

5) After defining all the model settings, insert your query into the editor. It is not necessary to create commands like “DROP TABLE” or “CREATE TABLE”, just put the “SELECT”;

6) Click on “Save” at the bottom of the editor;

7) Click on “Publish”;

8) And finally, change the “Active?” setting to “Yes”.

Now that your model is active, just wait for the first execution of your triggers for the table to be created in your database. The model will be automatically updated whenever the triggers are executed, within the defined interval.

To deactivate your model, just edit the “Active” setting to “No” and it will no longer be updated.

Archiving models

When you archive a model, it will no longer show up in most places in the platform and will only be accessible via direct link. It is also not possible to edit a model after it has been archived.

To archive a model, first disable it then click no the ARCHIVE button that will appear at the botton of the left configuration panel