skip to Main Content

Did anyone knows the length of CustomerID field of Shopify Customer JSON, because I want to store the customerID into my database where column length is restricted that I can not change. So I need to know the length.
Thanks in advance.

2

Answers


  1. Chosen as BEST ANSWER

    finally I got the Answer from Shopify..

    As for the IDs they obviously seem to be BIGINT. But that would be wasteful and I seriously cannot imagine Shopify having anticipated gazillions of data rows for the next 1000's of years to come. So what's more likely is that they're composite primary keys which also would make sense given that Shopify surely needs to do some kind of partitioning.

    Generally, you will find that most resources follow a N1 * [10 pow 12, 10 pow 13 - 1]. Customer and Products are in the N=1 as far as I can tell. Options are in N=2, Images N=5 etc. What's beyond that is anyones guess but probably consists of some kind of composite keys or MMR sequence (among other solutions) to identify the DB within a cluster - for the first part and some random INT key for the actual row. Random as in something like FLOOR(rand() * (max - min) + min) because you don't want curious merchants and app vendors or up-to-no-good black hats to predict stuff e.g.


  2. There isn’t a predefined length on CustomerID, as their resources follow the ActiveRecord pattern of incrementing integers as IDs (for the time being at least). As of now, it’s around 12 digits max, but that is growing.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search