Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
How do we create the partitions in hive with the Spaces?

We want to create the partitions in hive table, but the partition name have some spaces. So it cant create the partitions. Currently we are using the java. We tried to escape the space but all are throwing exception.

URL -s3n://comp-data-bckp/data/datav/sample_test/sample_test_inner/2016-06-27/hive/warehouse/datav/sample_test_inner/platform=SONY PS3

HiveConf hiveConf= new HiveConf();
    hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, URL);
    hiveConf.setIntVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT, 60);
    CliSessionState css = new CliSessionState(hiveConf);
    css.in = System.in;
    css.out = null;
    css.err = null;
    css.setIsSilent(true);

    SessionState.start(css);
    CliDriver cli = new CliDriver();
    int response = cli.processLine(statements);

    SessionState s = SessionState.get();
    if (s != null && s.out != null && s.out != System.out)
    {
        s.out.close();
    }
    return response;


    java.net.URISyntaxException: Illegal character in path at index 126: s3n://comp-data-bckp/data/datav/sample_test/sample_test_inner/2016-06-27/hive/warehouse/datav/sample_test_inner/platform=SONY PS3

When we try to escape the space character with below options system still throws the above error.

-   \\                               (eg. S3n://…./ platform=SONY\\ PS3)

-   %20                        (eg. S3n://…./ platform=SONY%20PS3)

-   +                             (eg. S3n://…./ platform=SONY+PS3)

Please assist if there are any options to escape it and provide inputs for proceeding further.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!