Skip to content
Saturday, April 1, 2023
IT Talkers
  • ETL
    • Pentaho
    • Tableau
  • SCRIPTING
    • Shell Script
  • AWS
    • ATHENA
    • S3
    • SQL_SERVER
  • Git GUI
  • DB
    • HIVE
    • ORACLE
    • SQL_SERVER
  • BIG DATA
    • HDFS
  • SAS
  • Tutorials
    • C++11
      • Basics
    • C++98
      • Basics
      • Const Keyword
      • Friend Keyword
      • Polymorphism
      • Memory Allocation
      • Static Keyword
      • Miscellaneous
    • Networking
    • Data Structure
      • Stack
  • Contact Us

Tag: mask part of string using database query

Masking the mobile number in hive

admin

Today, I will discuss about the masking the details of the customer. It may be mobile number, Bank Account Number,Security PIN,customer_ID etc.For this, we can use combination of substring and regexp_replace function in hive.For example, you want to mask the first 5 digit of a mobile number like 1234567890 as #####67890, then use the below query. select concat(regexp_replace(substring(‘1234567890′,1,5),'[0-9]’,’#’),substring(‘1234567890’,6,5)); You can use mask_show_last_n function but here concern is, it will replace number by “n”. See the below Query : select mask_show_last_n(‘1234567890’,5) ; Result is nnnnn67890

DATABASE, HIVEmask bank account number using query, mask mobile number using database query, mask mobile number using hive, mask part of string using database query

Recent Posts

  • Find Uncommon Characters in two Strings
  • Parenthesis Check in Linux
  • Minimum Index of all Characters in a String
  • Get all distinct Character in a string
  • Remove all repeated Characters in a String
  • Find first repeated character
  • Count Inversions in Array
  • kth smallest element in array
  • Groups in Array
  • Rearrange array alternatively

Categories

all about technology

Proudly powered by WordPress | Theme: AcmeBlog by AcmeThemes.