<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Using underscore _ in a database name in HIVE in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227685#M60983</link>
    <description>&lt;P&gt;Yes, &lt;A rel="user" href="https://community.cloudera.com/users/18202/naveenoxford.html" nodeid="18202"&gt;@Naveen Keshava&lt;/A&gt;, that is correct. You will create two tables, say, employees_staging and employees_parquet. Employees_staging will be stored as text and employees_parquet will be stored as parquet. You will sqoop into employees_staging and then run another SQL command to insert into employees_parquet from employees_staging. &lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2017 23:38:47 GMT</pubDate>
    <dc:creator>slachterman</dc:creator>
    <dc:date>2017-05-11T23:38:47Z</dc:date>
    <item>
      <title>Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227682#M60980</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I created a HIVE database called employees_exercise and the creation was successful. However, when I am running a sqoop job to connect to a mysql instance and load into hdfs, i can getting the following error on running the sqoop command.&lt;/P&gt;&lt;P&gt;sqoop import --connect  jdbc:mysql://ip-10-0-0-247.eu-west-2.compute.internal/employees --username &amp;lt;&amp;lt;Removed&amp;gt;&amp;gt; --password &amp;lt;&amp;lt;removed&amp;gt;&amp;gt; --table employees  --hive-import --hive-table &lt;STRONG&gt;employees_exercise.employees&lt;/STRONG&gt; --hive-import --as-parquetfile -m 1&lt;/P&gt;&lt;P&gt;error message is below:&lt;/P&gt;&lt;P&gt;17/05/11 10:10:26 INFO mapreduce.ImportJobBase: B&lt;STRONG&gt;eginning import of employees
17/05/11 10:10:27 INFO&lt;/STRONG&gt; manager.SqlManager: Executing SQL statement: SELECT t.* FROM `employees` AS t LIMIT 1
17/05/11 10:10:28 ERROR sqoop.Sqoop: Got exception running Sqoop: org.kitesdk.data.ValidationException: Dataset name employees_exercise.employees is not alphanumeric (plus '_')
org.kitesdk.data.ValidationException: &lt;STRONG&gt;Dataset name employees_exercise.employees is not alphanumeric (plus '_')
        at &lt;/STRONG&gt;org.kitesdk.data.ValidationException.check(ValidationException.java:55)
        at org.kitesdk.data.spi.Compatibility.checkDatasetName(Compatibility.java:103)
        at org.kitesdk.data.spi.hive.HiveManagedMetadataProvider.create(HiveManagedMetadataProvider.java:43)
        at org.kitesdk.data.spi.hive.HiveManagedDatasetRepository.create(HiveManagedDatasetRepository.java:77)
        at org.kitesdk.data.Datasets.create(Datasets.java:239)
        at org.kitesdk.data.Datasets.create(Datasets.java:307)
        at org.apache.sqoop.mapreduce.ParquetJob.createDataset(ParquetJob.java:107)
        at org.apache.sqoop.mapreduce.ParquetJob.configureImportJob(ParquetJob.java:89)
        at org.apache.sqoop.mapreduce.DataDrivenImportJob.configureMapper(DataDrivenImportJob.java:108)
        at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:260)
        at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:673)
        at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:118)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:497)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:244)&lt;/P&gt;&lt;P&gt;Please could some one assist?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 21:16:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227682#M60980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-05-11T21:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227683#M60981</link>
      <description>&lt;P&gt;My hypothesis is this is an issue specific to using the --as-parquetfile argument as there appears to be a KiteSDK bug related to this behavior. Can you please try executing the command without that? The pattern would be to create a staging table first and then insert into a parquet-backed table.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 21:55:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227683#M60981</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2017-05-11T21:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227684#M60982</link>
      <description>&lt;P&gt;Thank you. @slachterman. That woirked, I removed the --as-parquetfile and that seemed to have fixed the problem. When you say insert into a parquet-backed table, do you mean I have to create a table in HIVE ahead of loading into it? Amy documentation that you can point to will be helpful.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 22:34:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227684#M60982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-05-11T22:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227685#M60983</link>
      <description>&lt;P&gt;Yes, &lt;A rel="user" href="https://community.cloudera.com/users/18202/naveenoxford.html" nodeid="18202"&gt;@Naveen Keshava&lt;/A&gt;, that is correct. You will create two tables, say, employees_staging and employees_parquet. Employees_staging will be stored as text and employees_parquet will be stored as parquet. You will sqoop into employees_staging and then run another SQL command to insert into employees_parquet from employees_staging. &lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 23:38:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227685#M60983</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2017-05-11T23:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227686#M60984</link>
      <description>&lt;P&gt;thank you, &lt;A rel="user" href="https://community.cloudera.com/users/11295/slachterman.html" nodeid="11295"&gt;@slachterman&lt;/A&gt;. one final question, when you meant "run another SQL command to insert into employees_parquet from employees_staging." were you refering to a simple "insert into" sql command? &lt;/P&gt;&lt;P&gt;I tried it, and it looks like the insert worked into the target table. But how do I then make sure the file is in hdfs? with parquet format?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 05:05:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227686#M60984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-06-05T05:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227687#M60985</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;You can use describe extended to see the HDFS path associated with the Hive table and you can use &lt;A href="https://github.com/Parquet/parquet-mr/tree/master/parquet-tools"&gt;parquet-tools&lt;/A&gt; to interact with the parquet file.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 06:13:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227687#M60985</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2017-06-05T06:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227688#M60986</link>
      <description>&lt;P&gt;I also had the same issue, but I was not ready to create a staging table, felt like that is not the real solution.&lt;/P&gt;&lt;P&gt;Just do like this&lt;/P&gt;&lt;P&gt;instead of using "--hive-table &lt;STRONG&gt;employees_exercise.employees&lt;/STRONG&gt;" use like "--hive-database &lt;STRONG&gt;employees_exercise &lt;/STRONG&gt;--hive-table &lt;STRONG&gt;employees" &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It worked well for me&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 01:29:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227688#M60986</guid>
      <dc:creator>remyasenan</dc:creator>
      <dc:date>2018-05-08T01:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using underscore _ in a database name in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227689#M60987</link>
      <description>&lt;P&gt;I faced the same issue in a different case, a incremental import from oracle to a parquet file in hdfs. In my case, the issue ocurred when i specified the --table parameter.&lt;/P&gt;&lt;P&gt; After some researches, i concluded that this issue is caused by the dot when i specified the "schema.table". In adition to mentioned above, you can use the paremeter --query instead the --table in your sqoop import. Eg:&lt;/P&gt;&lt;P&gt;instead of:&lt;/P&gt;&lt;P&gt;sqoop --import --connect jdbc:oracle:thin:@host:port/db --username user --P --table schema.table --split-by column --target-dir /some_hdfs_path/schema/table --incremental append --check-column ID --as-parquetfile --fields-terminated-by '|'&lt;/P&gt;&lt;P&gt;i used:&lt;/P&gt;&lt;P&gt;sqoop --import --connect jdbc:oracle:thin:@host:port/db --username user --P --query "SELECT * FROM schema.table WHERE \$CONDITIONS"  --split-by column --target-dir /some_hdfs_path/schema/table --incremental append  --check-column column --as-parquetfile  --fields-terminated-by '|'&lt;/P&gt;&lt;P&gt;the \$CONDITIONS  is required by sqoop, without this you'll got another error.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 01:40:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-underscore-in-a-database-name-in-HIVE/m-p/227689#M60987</guid>
      <dc:creator>kalebyjaun</dc:creator>
      <dc:date>2018-06-29T01:40:55Z</dc:date>
    </item>
  </channel>
</rss>

