You can use a regex to solve this. If you're using this file path in Java, you could try something like the following:
String s = "s3://some-bucket/pageviews/dt=20120311/key=ACME1234/site= example.com/Output-file-1"; System.out.println(s.replaceAll("*[a-z]{2,4}=*", "")); If you'd like to do this in Hive, there's the following function offered out of the box: regexp_replace(string INITIAL_STRING, string PATTERN, string REPLACEMENT) So if you're field is called class_path, then you could do: regexp_replace(class_path, "*[a-z]{2,4}=*", ""); Hope that helps! Best Regards, Nishant Kelkar On Tue, Sep 9, 2014 at 8:27 AM, anusha Mangina <anusha.mang...@gmail.com> wrote: > My Table has Dynamic Partitions and creates the File Path as > > s3://some-bucket/pageviews/dt=20120311/key=ACME1234/site= > example.com/Output-file-1 > > > Is there something i can do so i can have the path always as > > s3://some-bucket/pageviews/20120311/ACME1234/example.com/Output-file-1 > > Please help me out guys > >