Adalo is a no-code platform used to build custom mobile and web applications without needing programming skills. It allows users to design interfaces, manage databases, and integrate functionality through simple drag-and-drop tools, making app development accessible and efficient. When combined with CData Connect AI, it provides access to SingleStore data to build custom applications and more.
This article explains how to use CData Connect AI to create a live connection to SingleStore and how to connect and access live SingleStore data from the Adalo platform.
Configure SingleStore connectivity for Adalo in CData Connect AI
To work with SingleStore data in Adalo, we need to connect to SingleStore from Connect AI, provide user access to
the connection, and create OData endpoints for the SingleStore data.
Connect to SingleStore from Connect AI
CData Connect AI uses a straightforward, point-and-click interface to connect to data sources.
-
Log into Connect AI, click Sources, and then click Add Connection
π Adding a Connection
- Select "SingleStore" from the Add Connection panel
π Selecting a data source
-
Enter the necessary authentication properties to connect to SingleStore.
The following connection properties are required in order to connect to data.
- Server: The host name or IP of the server hosting the SingleStore database.
- Port: The port of the server hosting the SingleStore database.
- Database (Optional): The default database to connect to when connecting to the SingleStore Server. If this is not set, tables from all databases will be returned.
Connect Using Standard Authentication
To authenticate using standard authentication, set the following:
- User: The user which will be used to authenticate with the SingleStore server.
- Password: The password which will be used to authenticate with the SingleStore server.
Connect Using Integrated Security
As an alternative to providing the standard username and password, you can set IntegratedSecurity to True to authenticate trusted users to the server via Windows Authentication.
Connect Using SSL Authentication
You can leverage SSL authentication to connect to SingleStore data via a secure session. Configure the following connection properties to connect to data:
- SSLClientCert: Set this to the name of the certificate store for the client certificate. Used in the case of 2-way SSL, where truststore and keystore are kept on both the client and server machines.
- SSLClientCertPassword: If a client certificate store is password-protected, set this value to the store's password.
- SSLClientCertSubject: The subject of the TLS/SSL client certificate. Used to locate the certificate in the store.
- SSLClientCertType: The certificate type of the client store.
- SSLServerCert: The certificate to be accepted from the server.
Connect Using SSH Authentication
Using SSH, you can securely login to a remote machine. To access SingleStore data via SSH, configure the following connection properties:
- SSHClientCert: Set this to the name of the certificate store for the client certificate.
- SSHClientCertPassword: If a client certificate store is password-protected, set this value to the store's password.
- SSHClientCertSubject: The subject of the TLS/SSL client certificate. Used to locate the certificate in the store.
- SSHClientCertType: The certificate type of the client store.
- SSHPassword: The password that you use to authenticate with the SSH server.
- SSHPort: The port used for SSH operations.
- SSHServer: The SSH authentication server you are trying to authenticate against.
- SSHServerFingerPrint: The SSH Server fingerprint used for verification of the host you are connecting to.
- SSHUser: Set this to the username that you use to authenticate with the SSH server.
π Configuring a connection (Salesforce is shown)
-
Click Save & Test
-
Navigate to the Permissions tab in the Add SingleStore Connection page and update the User-based permissions.
π Updating permissions
Add a Personal Access Token
When connecting to Connect AI through the REST API, Workspaces, or the Virtual SQL Server, a Personal Access Token (PAT) is used to authenticate the connection to Connect AI. It is best practice to create a separate PAT for each service to maintain granularity of access.
-
Click on the Gear icon () at the top right of the Connect AI app to open the settings page.
-
On the Settings page, go to the Access Tokens section and click Create PAT.
-
Give the PAT a name and click Create.
π Creating a new PAT
-
The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.
Configure SingleStore Endpoints for Adalo
After connecting to SingleStore, create a workspace for your desired table(s).
-
Navigate to the Workspaces page and click Add to create a new Workspace (or select an existing workspace).
π The Workspaces page.
π Adding a new Workspace.
-
Click Add to add new assets to the Workspace.
-
Select the SingleStore connection (e.g. SingleStore1) and click Next.
π Selecting an Asset (Salesforce is shown).
-
Select the table(s) you wish to work with and click Confirm.
π Selecting Tables (Salesforce is shown).
-
Make note of the OData Service URL for your workspace, e.g. https://cloud.cdata.com/api/odata/{workspace_name}
With the connection, PAT, and Workspace configured, you are ready to connect to SingleStore data from Adalo.
Build a custom app with Adalo
After configuring CData Connect AI, you can begin developing the Adalo app using SingleStore data.
- Click on CREATE NEW APP.
π Create a new app.
- Select Desktop Web App and click on Next.
π Select the kind of app to be created.
- You can choose any template, but for testing purposes, we've chosen a Blank template.
π Select the preferred template.
- Finally, add an app name and choose a color scheme, and your app is ready to go!
π Add a name and color scheme to the app.
Registering external collections
Adalo uses a data structure called Collection to manage app data and offers a feature called External Collections with APIs, which lets you seamlessly integrate Collection with external APIs. Use this feature to connect to Connect AI.
- After creating an app, you first need to register a Collection, which is a definition for handling data within the Adalo app. There are two types of Collections: Database Collections, which are like Adalo's own internal database, and External Collections, which allow access to external APIs. In this case, we will access an external API, registering it as an External Collection.
π Add a new collection under Database Collections.
- On the External Collections registration screen, click on ADD COLLECTION to enter the collection name (any name of your choice), and provide the API base URL endpoint (OData endpoint registered on Connect AI). Make sure to add "/(table)" to the OData URL to access the specific endpoint. (Refer to the image given for reference)
π Add a name and provide an API URL endpoint or OData endpoint to the collection.
- In order to authenticate, you need a base64 authorization header comprising your username and PAT, joined by a colon. For example, [email protected]:MY_PAT. You can use a scripting tool, web tool, or other application to create this header.
Using Postman to generate the Authorization header
- Open the Postman application. Enter the OData URL mentioned in the previous step for a GET request on Postman. Click on the Authorization tab and select Auth Type as "Basic Auth". Enter the Username and Password as follows and click on Send:
- Username: Connect AI Username
- Password: PAT generated on Connect AI
π Add username and password to authorize the OData endpoint in Postman.
- Go to the Headers tab and copy/save the value of the Authorization key.
π Obtain the Authourization key from Postman.
- Back in Adalo, click on ADD ITEM and select Header.
π Open to add the collection header.
- Enter the details in the Header section as follows:
- Name: "Authorization"
- Value: Authorization key value copied in the previous step
π Configure the collection header with the Authorization key.
- Select Done and click on Next.
- Select Get All and enter "value" in the Results Key section. Click on Done and Next.
π Enter the results key.
- Now, to test the API setup, click on RUN TEST. If you finally see the message and response shown below, the creation of External Collections is complete.
π Run the test.
Creating a list screen
After configuring CData Connect AI, you can now begin developing the app on Adalo using SingleStore data.
- First, click the + button in the upper right corner of the Adalo screen to display the list screen, then drag and drop "Simple List" onto the screen.
π Add a list to the app.
- Once the layout is complete as shown below, link the External Collections definition you created earlier to What is this a list of?
π Mention the list type
- Click on "Add Magic Text" button (as shown) to add the "Title" and "Subtitle" to the data items you want to obtain.
π Add the title and subtitle
- Now, click on View App in the top right corner of the screen and select Staging Preview.
π Preview the app
-
You can now view the SingleStore data in the app created on Adalo.
π View SingleStore table data in the form of a list in Adalo app
Live connections to SingleStore data from cloud applications
Adalo now allows you to connect to live SingleStore data directly, allowing you to create more connections and apps without duplicating SingleStore data.
To get real-time data access to over 100 SaaS, big data, and NoSQL sources directly from your cloud applications, visit CData Connect AI.