https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
b

breezy-hairdresser-40587

11/15/2023, 9:28 AM
And I'm using custom data source (MySQL), but don't now how to send tracking data to the data source
r

rhythmic-agent-34208

11/15/2023, 9:28 AM
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
f

fresh-football-47124

11/15/2023, 9:54 AM
Tracking events for the experiment exposure are sent via the trackingCallback method
other events use whatever event tracking you already have
you can use any db or event tracker you like - Jitsu, Rudderstack, Segment, whatever
b

breezy-hairdresser-40587

11/15/2023, 10:14 AM
Hi @fresh-football-47124, I'm using my own MySQL database, so that means I need to insert data to DB manually, inside of trackingCallback method, is this correct ?
r

rhythmic-agent-34208

11/15/2023, 7:03 PM
Hi, that's correct. In the screenshot you sent, there's a comment that says
Copy code
// TODO: Use your real analytics tracking system
The code to send data to MySQL would go there. In the screenshot you sent, info is only being printed, not stored in the database.
b

breezy-hairdresser-40587

11/16/2023, 3:01 AM
Hi @brief-honey-45610, I tried to create my own MySQL data source to test the query, but always got the error when executing it. Here are my design and implementation, could you please take a look and advise if anything wrong here ? many thanks
r

rhythmic-agent-34208

11/16/2023, 6:21 PM
Hi, as I'm looking into this I noticed your SQL query doesn't end in a semi-colon (;). Could you try adding that and let me know if you still get the error? You may also need to prepend the column names in your SQL query with the table name, like ​`viewed­_experiment.user­_id`​
b

breezy-hairdresser-40587

11/17/2023, 2:12 AM
Hi @brief-honey-45610, tried both suggestions and I still can't execute the query. Add ; to the end -> error "Don't end your SQL statements with semicolons since it will break our generated queries" Add table name before column name -> error "You have an error in your SQL syntax;". Btw we're using the MySQL version 5.6, is this an issue with the compatibility version?
b

brief-honey-45610

11/17/2023, 4:13 PM
Hi David, thanks for trying my suggestions. It was important to rule them out as simple causes of the issue. Let me check with the team about a potential version incompatibility next. I'll update you here once I have more info.
❤️ 1
r

rhythmic-agent-34208

11/17/2023, 8:05 PM
Hi David, unfortunately we don't really have any resources for setting up GrowthBook with MySQL. What are you trying to achieve, specifically? Are you trying to create a metric from scratch?
b

breezy-hairdresser-40587

11/18/2023, 5:31 AM
Yes @brief-honey-45610, our system uses PHP and MySQL, and we'd like to setup GrowthBook custom data source with MySQL (as I saw this is an available option for custom data source). We're trying to create and test some metrics for our experiment. Technically, those are some very basic SQL queries so I think it is not a syntax issue, instead of that, I'm thinking about an incompatibility issue with MySQL version, but I can't find the information about of minimum required version on the GrowthBook documentation
f

fresh-football-47124

11/18/2023, 7:14 AM
What mysql version do you have?
I know we require support for CTE, which I think was MySQL 8
b

breezy-hairdresser-40587

11/18/2023, 7:15 AM
@fresh-football-47124 we’re using 5.6 version
f

fresh-football-47124

11/18/2023, 7:16 AM
oh man, thats from 2015
b

breezy-hairdresser-40587

11/18/2023, 7:17 AM
Yeah I know…
f

fresh-football-47124

11/18/2023, 7:17 AM
ya, let me see if there is a work around
I doubt you’re looking to edit the SQL code in our code base?
👍 1
b

breezy-hairdresser-40587

11/21/2023, 10:27 AM
hi @fresh-football-47124 do you have any suggestions to make our system (MySQL 5.6 version) can work with Growthbook. I know version 5.6 doesn't support CTE but I'd like to see if there is any solution. Thank you
r

rhythmic-agent-34208

11/22/2023, 10:06 PM
Hi again, unfortunately we don't know of any way to make MySQL 5.6 work with our system. Is upgrading to at least version 8 and/or using a different data store really not an option?
👍 1
14 Views