Settings

Managing Data Sources

Once you connect at least one data source, you can manage the environments and functions associated with that source. You can also adjust how you want to sync the data source, and update connection details if needed. 

Access this through Company Settings → Data & Functions Sources. You can add a new data source or manage environments.

Click on a data source, then click on the Functions tab to edit sync settings and manage functions.

Sync

Click “Sync” to start a manual sync of the data from your data source into Internal. This will update the schema and associated data changes. 

Click “View” to see more details about your sync history, and to change your sync from “Automatic” to “Manual”. If set to Automatic, Internal will sync the data source daily (at the time shown). On Manual, Internal will only sync when you come to this page and trigger a manual sync of your data. 


Functions

Functions let you perform various actions on your data. You can add new functions here (as well as in the App Data panel in a Space's Edit mode), and then connect your components to functions in Spaces. A function can list data, update a specific record, bulk update multiple records that fit a certain criteria, or even call an API endpoint and pass parameters. 


When you connect a database, basic CRUD functions are generated automatically, allowing you to list, insert, update, and delete a single record. These functions will appear as long as the credentials used to connect to the database have these privileges. Connecting a business app will generate similar CRUD functions. Check out the documentation for a specific data source to see what functions are generated automatically. 


Managing functions

You’ll see a button to “Add Function", and you'll see a list of functions available in Internal. You can view and edit custom functions by going to the App Data panel when you're editing a Space.


In some cases, you may want a function to act on more than one record (bulk update). You can do that by creating a custom function for a database. Custom functions can also be created to read data through a SQL query, aggregation pipeline (MongoDB), or through API.


Internal also gives you the ability to create functions from your existing APIs or graphQL mutations. This can greatly extend the functionality of the tools you build. To do this, you can create a custom function for a HTTP data source.