Some of the Tulip apps that the team at Genie have been creating can get quite complex, with a lot of reuse of connector functions across apps as well as just a large amount of connector functions.
A couple of lessons learned about connector functions. First off, we have multiple instances all talking to a central Amazon Aurora PostgreSQL cluster. In order to differentiate between the traffic we create multiple DB (by instance) accounts. Recently we also have found it useful to create separate connectors by schema. So our connections look something like this.

We also have a standard naming for the functions. Two letter abbreviation of the schema followed by what type of function (c = create, r = read, u = update, d = delete) and then the table name or other identifier.
So going back to the multitude of functions. We wanted to find a way to find what connector functions were being used in what apps. We noticed that this data is contained in the app.json of an exported Tulip app, so Moni Priyanka created a quick script to pull this data and association out of the .json and put it into a postgres table for some easy analysis.
Setup
[ ] You will need a postgres database and then create two tables. Run this script
[ ] Create a DB user that can write to those tables
[ ] Create a tulip bot that has access to read app data (Requires the apps:read
API key scope) read more here
[ ] Modify the .ini to match your environment from config.ini
[main]
header_table_name = tulipappstructure.tulip_info_header
detail_table_name = tulipappstructure.tulip_info_details
url_env = https://instance.tulip.co/api/v3/appGroups
host = rds.amazonaws.com
database = adatabase
db_user = adatabaseuser
db_password = adatabasepassword
api_username = apikey
api_password = xxxx
[ ] Download the python script from here
[ ] Find an app on your tulip instance and export it in the same folder as the tulip_app_info.py


Run the python script. (you might have to install some dependencies)
Assuming everything is setup OK you should have an entry in the header table

And the detail table should have lines for each function

It also includes a ‘direct link’ to where in the app the function is being used

Hope you find this script useful!