Question: I have url like this `http://example.com/dir1/dir2/dir3/dir4/Page.php?charts.htm` and I need to remove the page/extension before the querystring so it outputs `http://example.com/dir1/dir2/dir3/dir4/?charts.htm` 

```
$url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$temp = explode( '?'  , $url );
$temp[0] = ""; //remove part before the ?

```

Not even sure if I'm on the right track here

Answer: 
insert overwrite directory 'EXTERNAL\_DIRECTORY' STORED AS PARQUET select \* from SOURCE\_TABLE\_NAME;
Use the below approach

> 
> create table parque\_table (
> 
> 
> ) ROW FORMAT SERDE 'parquet.hive.serde.ParquetHiveSerDe' STORED AS
>  INPUTFORMAT "parquet.hive.DeprecatedParquetInputFormat"
>  OUTPUTFORMAT "parquet.hive.DeprecatedParquetOutputFormat" LOCATION '${hiveconf:hive\_location}';
> 
> 
> INSERT OVERWRITE TABLE parque\_table select from othertable
> 
> 
>