Enter a name for the metric source and optionally a description. The metric source name should be specific to a particular metric you want to create. E.g., it should be something like "# of new subscribers" as opposed to something more generic like "PostgreSQL"
Choose "PostgreSQL" as the source.
If a metric already exists that you would like to populate with data from this metric source, enter it into the "Target metric" field. Otherwise, you can connect this metric source to a metric later.
Fill in your Host with either the domain name or IP address of your PostgreSQL instance.
Fill in the Port with your port, the default for PostgreSQL is 5432.
Fill in your PostgreSQL database name, username, and password.
Input the query into DoubleLoop. The output of the query must contain columns named "date" and "value". We recommend that you test out the query in PostgreSQL before you input it into DoubleLoop.
Part 2: Create a "Metric"
You're going to use the "metric source" you created to populate a "metric" in DoubleLoop. If that metric already exists, skip this step. Otherwise, you can add the metric by clicking "Add metric" from one of your strategies or on the metrics listing page. It's expected that the metric could have the same name as the metric source.
In the settings for the metric, for "Metric source," select the metric source you previously created.
Part 3: Confirm it worked
Every night, DoubleLoop will populate data for your metric based on the query you specified for the metric source. So you should see your metric data tomorrow. In the meantime, you can click "Run" to test it.
That's it. Please let us know your feedback. If you have any questions, please contact us.