Skip to content

Instantly share code, notes, and snippets.

@iolloyd
Created July 12, 2016 16:33
Show Gist options
  • Save iolloyd/d04da8e2f21db17ff619af2282bd2be3 to your computer and use it in GitHub Desktop.
Save iolloyd/d04da8e2f21db17ff619af2282bd2be3 to your computer and use it in GitHub Desktop.
Replacing uuids with incremental integers
sql_query_pre = SET @x = 0
# Since we have a uuid as an id, we need to swap that out
# for an integer
sql_query = \
SELECT \
@x := @x + 1 as id, user_id, type, name, email, browser, question, unix_timestamp(created) as created \
FROM \
contacts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment