title: Create Partition Based on Customer Account
body: <p>I need to partition a big Hive Table based on customer identifier (account number like 12345678). </p>
  
  <p>In particular, I am looking for a function that gets customer_id and then converts it into a numerical value like 0-9 so it becomes my partition. By doing so, I have 10% of my customers in each partition.</p>
  
  <blockquote>
    <p>for example, f('123455') returns 4</p>
  </blockquote>
  
  <p>Appreciate hint</p>