Looker

  1. Create a Look containing the data you want to have in your Causal data source:
    • First column should contain the date (supported date formats: YYYY-MM-DD and YYYY-MM)
    • Second column should contain the cohort (optional)
    • The following columns should contain the categories (strings) (optional)
    • The following columns should contain the variables (numbers) (at least 1)
    • Make sure missing dates are not filled (expand the Visualisation section, click on the gear icon of the date column header, and click "Remove filled in dates.” if necessary)
  2. Create a Webhook data source in Causal (click the link and follow the instructions)
  3. Set up the scheduled export in Looker:
    • Click on the gear Icon at the top right and select “Schedule”
  • Select “Webhook” in the “Where should this data go?” section
  • Enter the Webhook URL of your data source
  • Select “JSON — Simple, Inline” in the “Format data as” section
  • Configure the trigger (Repeating interval or Datagroup update)
    • This allows you to configure when the data will be sent to Causal - either on a repeating interval (e.g. once every day) or every time something in your database changes.
    • Note: You will still have to manually refresh the data source in Causal in order to pull the updated numbers into models that use the data source.
  • Open the Advanced options and select “All results”, enable “Apply visualization options” and disable “Formatted data values”

  • Click “Save All”

Troubleshooting

  • Check if the Look as the right format (see Transactions). For every category you need one column in the Look.
  • Make sure the date format is correct, e.g. 2022-04-20 for April 20th 2022 or 2021-12 for December 2021
  • Nested JSON:
    • Depending on the Look, the values might be nested in the JSON. Go to https://my.causal.app/data, click on the three dots at the top right of the data source card, then click "Edit". Now click the "View last uploaded data" button at the bottom of the modal to see the received JSON object.
    • In the example below, the variables A, B and C are nested in the Count field. To access them in the data source you have to enter the whole path to the object as the variable keys: Count.A, Count.B and Count.C