To set up a project using the PB tool, follow these steps:
1: Install PB
Install the Profile Builder tool by running the following command:
pip3 install profiles-rudderstack
If you have already installed PB, use the following command to update its version:
pip3 install profiles-rudderstack - U
RudderStack recommends using a Python virtual environment to maintain an isolated and clean environment.
pipx install profiles-rudderstack
2: Create warehouse connection
RudderStack supports Snowflake warehouse to build Profiles. You must grant certain warehouse permissions to let RudderStack read from schema having source tables (for example, tracks and identifies tables generated via Event Stream sources), and write data in a new schema created for Profiles.
Create a warehouse connection to allow PB to access your data:
pb init connection
Then, follow the prompts to enter details about your warehouse connection. A sample connection for a Snowflake account is as follows:
Enter Connection Name: test
Enter target: (default:dev): # Press enter, leaving it to default
Enter account: ina13147.us-east-1
Enter warehouse: rudder_warehouse
Enter dbname: your_rudderstack_db
Enter schema: rs_profiles # A segregated schema for storing tables/views created by Profiles
Enter user: profiles_test_user
Enter password: <password>
Enter role: profiles_role
Append to /Users/<user_name>/.pb/siteconfig.yaml? [y/N]
This command generates and runs the SQL files in the warehouse, creating the material tables.
8: View generated tables
The view user_id_stitcher will always point to the latest generated ID stitcher and user_profile to the feature table.
View the generated tables in the warehouse:
Here’s what the columns imply:
user_main_id: Rudder ID generated by Profile Builder. Think of a 1-to-many relationship, with one Rudder ID connected to different IDs belonging to same user such as User ID, Anonymous ID, Email, Phone number, etc.
other_id: ID in input source tables that is stitched to a Rudder ID.
other_id_type: Type of the other ID to be stitched (User ID, Anonymous ID, Email, etc).
valid_at: Date at which the corresponding ID value occurred in the source tables. For example, the date at which a customer was first browsing anonymously, or when they logged into the CRM with their email ID, etc.
user_main_id: Rudder ID generated by Profile Builder.
valid_at: Date when the feature table entry was created for this record.
first_seen, last_seen, country, first_name, etc. - All features for which values are computed.
Migrate your existing project
To migrate an existing PB project to the schema version supported by your PB binary, navigate to your project’s folder. Then, run the following command to replace the contents of the existing folder with the new one:
pb migrate auto --inplace
A confirmation message appears on screen indicating that the migration is complete.
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
for the working of basic functionalities of the website. We also use third-party cookies that
analyze and understand how you use this website. These cookies will be stored in your browser
consent. You also have the option to opt-out of these cookies. But opting out of some of these
have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.