Last Updated: 2022-01-25

A Source is a definition for how you pull data from an App into Grouparoo.

A Model has two types of Sources:

  • Primary Source: This is the data Source that provides the bulk of the data to your Model. You can only have one Primary Source per Model. The Primary Source will provide the unique identifier for each Record in the Model such as user_id or email_address.
  • Secondary Sources: These Sources supplement the data provided by the Primary Source.

See the Product Concepts documentation to learn more.

Step 1: Choose an App

Select your Model in the left side navigation and click the "Create Primary Source" button (or "Add new Source" for Secondary Sources.)

UI Config: New Source

Choose the App you'd like to use to feed your Source. The choices shown will be based on which Apps you've already connected. If you don't see the App you need, you can add a new App.

UI Config: Choose App

Step 2: Configure Your Source

Once you've chosen the App, fill in the appropriate configuration values for your Source. This will determine what information from the Source gets imported into Grouparoo.

You will also need to indicate what makes each Record in your Source unique. This must be a unique identifier such a user id, uid, or email.

Configuring Primary Source

When defining the Model's Primary Source, you will only need to select the identifier. Then, Grouparoo will generate a Property that will serve as the Primary Key for the Model where the Source is located.

In the example below, the id column of the users table will be used to identify each unique record.

UI Config: Configure Source

Configuring Secondary Sources

When defining a Secondary Source, you can map an attribute in the Source to an existing property that ties it back to the Primary Source.

In the example below, the "Pg Purchases" Source is being tied back to the Primary Source (Pg Users) via the user_id foreign key in the purchases table.

UI Config: Configure Source

Step 3: Add a Schedule

A Schedule defines how often Grouparoo will check your Source for new data. When there are additions or changes in your data Source, Grouparoo will pull that data in based on your Schedule settings.

You can choose how often Grouparoo will check your Source for new data. You will also point Grouparoo to the column that indicates when a row in your users table has been updated, such as an updated_at timestamp column.

UI Config: Add Schedule

Generated Config File

Grouparoo's UI Config will write a JSON file to your local filesystem based on your inputs. That file will be placed in the config/sources directory in your Grouparoo project. You can further edit this file locally or through the UI Config.

Learn more about config files

Next Steps

Once you've created a Source, you'll probably want to add more Record properties to it.

UI Config: Configure Source

The real magic happens when you put your users into groups, which you can then export. Once you have all the appropriate properties, you'll want to create some groups of users.

And once you have those groups, you can create a Destination to export data from groups. (Just remember to create an App for your Destination.)

Create a Group Create a Destination