Question

Google Sheets to mySQL Bit Column

  • 25 October 2020
  • 3 replies
  • 86 views

Userlevel 1

Hi.

I’m trying to insert new rows in mySQL via Google Sheets but seem to encounter this error every time I test it. The Verified column in mySQL is tagged as a Bit column, while the one in my Google Sheets has a number format. 

An Insert script in mySQL works fine, but the one Zapier makes has this error below. Any tips on how to fix this? Thanks in advance!

(pymysql.err.DataError) (1406, "Data too long for column 'verified' at row 1") [SQL: 'INSERT INTO visitor (company_name, email, first_name, last_name, verified, data_expiration_date) VALUES (%(company_name)s, %(email)s, %(first_name)s, %(last_name)s, %(verified)s, %(data_expiration_date)s)'] [parameters: {'company_name': 'AAA COMPANY', 'email': 'aip@gmail.ph', 'first_name': 'AN', 'last_name': 'LASTNAME', 'verified': '1', 'data_expiration_date': '2020-10-24T14:16:40-05:00'}]


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

The column of type “bit” in mysql accepts integers (1 or 0) or string (‘true’ or ‘false’). I think zapier is trying to insert your data 1 as a string. Try to use the string ‘true’ instead. Let me know how it goes.

Userlevel 7
Badge +10

Moved to “Ask The Community” to get more visibility.

Userlevel 7
Badge +8

Hi @vdhf ,

Circling back to see how you got on with this Zap! Did @stephenking ‘s suggestion help get you squared away?