After creating your Spinify Account, you can connect directly to your SQL database ding Snowflake) with Spinify and sync changes to tables in SQL to your leaderboards in Spinify.
Steps to Integrate an SQL Database
1. Go to the integrations page
- Log into your MySpinify account
- From the top-right menu click "Settings"
- You should automatically land on the Integrations section but double-check by ensuring the "Integrations" tab is highlighted in orange
2. Connect SQL with Spinify
- Choose "Connect" on the SQL Integration
- Fill in the details on the form
- Name - Description of the query to be used when connecting to leaderboards
- Database Type - The type of database to connect. Spinify currently supports the following database types: MSSQL, MySQL, PostgreSQL, Snowflake
- Host - Database Host (Note: this must be a publicly-accessible URL)
- Port - Optional port to connect to
- Database - Database name to connect
- Query - Select query or stored procedure to run
- Important: The query must return two columns named Email and Score
- Email corresponds to your participants' email addresses and is used to identify which player the score returned by the query belongs to
- Score corresponds to the participants' score that you'd like to appear on the leaderboard
- The column names must match exactly, or the data will not sync to your leaderboards.
- Click 'Activate' to save the connection
- Spinify will then automatically query this table every 15 minutes and update the scores of any leaderboards running on this integration based on the query response.
3. If needed, add additional connections by clicking the 'Connect to SQL' button
See How to Create a Competition on SQL data to learn how to use data returned by your SQL integration on a leaderboard.