跳到主要内容

Hydra

Hydra

Hydra is a powerful integration within the ILLA Cloud platform that seamlessly connects and consolidates various data sources and applications. Acting as a central hub, Hydra enables efficient data flow and communication between different systems, allowing for real-time data synchronization, automated workflows, and streamlined processes. With its robust capabilities, Hydra empowers businesses to optimize their operations, enhance collaboration, and make data-driven decisions with ease, all within the integrated ecosystem of ILLA Cloud.

Create Hydra

There are two ways to create a resource in ILLA after signing into your account.

  • Create in Resources

Sign into your Illa account, select **Resources** on the top of the page, and click **Create New** button.

external_resource

Select Hydra from the database list.

action_list

Connect to the database with the required parameters described in Connection Settings below.

Click **Test Connection** to see if we can successfully connect to the database. If yes, click Save Resources, else, double check the hostname, port, username, and password is correct.

After creating a resource, the ready Hydra will display as shown.

hydra_ex_ready

  • Create in Builder

Sign into your Illa account, create a project in Illa Builder in the **App** page, and navigate to the Action List at the bottom of the page. Click **new**, then select Hydra from the database list. Then, connect to the database with required parameters described in Connection Settings below.

Click **Test Connection** to see if we can successfully connect to the database. If yes, click Save Resources, else, double check the hostname, port, username, and password is correct.

Connection Settings

Here we need to provide information for connecting to Hydra database.

hydra_config

hydra_config_1

PropertiesRequiredDescription
NamerequiredThe name for resource when creating actions in the ILLA.
HostnamerequiredThe URL or IP address for your database
PortrequiredThe server host's port number that you should use to connect. If you don't specify a port, default port is '5432'.
DatabaserequiredThe name of the database
Usernamerequiredthe username you wish to use when logging in to the Hydra server.
PasswordrequiredUse this password for authentication.
SSL optionsoptionaldecides how high a secure SSL TCP/IP connection is prioritized while negotiating with the server.
CA Certificaterequireda digital certificate that is used to verify the identity of a server and establish a secure, encrypted connection between a client and a Hydra cluster. If you don't specify it, we have filled in a default certificate for you.
Client Keyoptionala parameter that is used to establish a secure connection between the Hydra client and the Hydra server.
Client Certificateoptionala security feature that allows a client to authenticate itself to a Hydra server

Create Actions

We have created a Hydra resource, we can add the action by selecting Hyd from action list and choosing the Create action button.

hydra_resource_list

Now we have added the Hydra server as an action to our building page.

hydra

Configure Hydra

PropertiesDescription
SQL querysql commands to fetch (select), insert, update, delete data from database
Transformertransforming data into the style you like using Javascript

Example usage:

  • Select
SELECT * FROM users ORDER BY lastname;
  • Insert
INSERT INTO users

(firstname, lastname, email)

VALUES

(

{{ NewUser.data.firstNameInput }},

{{ NewUser.data.lastNameInput }},

{{ NewUser.data.emailInput }}

);
  • Update
UPDATE users
SET firstname = '{{form1.updatedProfile.first}}'
WHERE id = {{ form1.updatedProfile.uid}};
  • Delete
DELETE FROM users WHERE id = {{ form1.updatedProfile.uid }};