Member since
08-10-2022
185
Posts
23
Kudos Received
9
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1399 | 03-26-2024 05:06 AM | |
| 1470 | 03-21-2024 03:01 AM | |
| 1869 | 08-08-2023 11:33 PM | |
| 1996 | 07-17-2023 10:26 PM | |
| 1107 | 07-17-2023 02:26 AM |
10-19-2023
04:39 PM
Why not using the resource pool and sub pool, if it specific query then pass the resource pool for this query and create resource pool or subpool for this query
... View more
10-18-2023
11:50 PM
very detailed and useful article. Thank you @asish!
... View more
08-23-2023
01:38 PM
1 Kudo
@MohammedMustaq Did you manage to solve this error? We are getting something similar. [Cloudera][ThriftExtension] (14) Unexpected response from server during a HTTP connection: SSL_read: Interrupted system call. @tj2007 The connector works on one of our servers with the same code and configs but not the other, We have enabled trace level logging but the error in there is the same as the above and there is no additional information around the error. We are able to connect to the Hive instance through isql from that server fine. We have tried with driver version 2.7.0.1002 and 2.6.16 but still the same issue. Kind Regards
... View more
07-31-2023
11:56 PM
Hi @Noel_0317, The error indicates that there are multiple partitions in the where condition. Can you try the below query: INSERT OVERWRITE TABLE db.table_name PARTITION(dt='2023-03-26') select distinct * from db.table_name where dt = '2023-03-26'; Let us know how it goes. Cheers!
... View more
07-18-2023
07:27 AM
@Choolake, Thank you for your participation in Cloudera Community. I'm happy to see you resolved your issue. Please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.
... View more
07-17-2023
02:26 AM
3 Kudos
Hi @Shivakuk It's a known behavior (bug) in CDH 6.3.4. The bug is resolved in CDP 7.x versions. Let me know if this helps. Cheers!
... View more
06-15-2023
11:47 PM
@Abdul_ As of now hive won't support row delimiter other new line character . Attaching the corresponding Jira for reference HIVE-11996 As a workaround, Recommend to update the input file using external libraries like awk,...etc and upload the input file in the corresponding FileSystem location to read. Eg - Through AWK [root@c2757-node2 ~]# awk -F "\",\"" 'NF < 3 {getline nextline; $0 = $0 nextline} 1' sample_case.txt
"IM43163","SOUTH,OFC","10-Jan-23"
"IM41763","John:comment added","12-Jan-23"
[root@c2757-node2 ~]# awk -F "\",\"" 'NF < 3 {getline nextline; $0 = $0 nextline} 1' sample_case.txt > sample_text.csv Reading from Hive Table 0: jdbc:hive2://c2757-node2.coelab.cloudera.c> select * from table1;
.
.
.
INFO : Executing command(queryId=hive_20230616064136_333ff98d-636b-43b1-898d-fca66031fe7f): select * from table1
INFO : Completed executing command(queryId=hive_20230616064136_333ff98d-636b-43b1-898d-fca66031fe7f); Time taken: 0.023 seconds
INFO : OK
+---------------+---------------------+---------------+
| table1.col_1 | table1.col_2 | table1.col_3 |
+---------------+---------------------+---------------+
| IM43163 | SOUTH,OFC | 10-Jan-23 |
| IM41763 | John:comment added | 12-Jan-23 |
+---------------+---------------------+---------------+
2 rows selected (1.864 seconds)
... View more
06-06-2023
09:37 PM
Once the data has been read from database, you don't need to write the same data to file (i.e. CSV ) . Instead you can write directly into hive table using DataFrame API's. Once the Data has been loaded you query the same from hive. df.write.mode(SaveMode.Overwrite).saveAsTable("hive_records") Ref - https://spark.apache.org/docs/2.4.7/sql-data-sources-hive-tables.html Sample Code Snippet df = spark.read \
.format("jdbc") \
.option("url", "jdbc:postgresql://<server name>:5432/<DBNAME>") \
.option("dbtable", "\"<SourceTableName>\"") \
.option("user", "<Username>") \
.option("password", "<Password>") \
.option("driver", "org.postgresql.Driver") \
.load()
df.write.mode('overwrite').saveAsTable("<TargetTableName>")
From hive
INFO : Compiling command(queryId=hive_20230607042851_fa703b79-d6e0-4a4c-936c-efa21ec00a10): select count(*) from TBLS_POSTGRES
INFO : Semantic Analysis Completed (retrial = false)
INFO : Created Hive schema: Schema(fieldSchemas:[FieldSchema(name:_c0, type:bigint, comment:null)], properties:null)
INFO : Completed compiling command(queryId=hive_20230607042851_fa703b79-d6e0-4a4c-936c-efa21ec00a10); Time taken: 0.591 seconds
INFO : Executing command(queryId=hive_20230607042851_fa703b79-d6e0-4a4c-936c-efa21ec00a10): select count(*) from TBLS_POSTGRES
.
.
.
+------+
| _c0 |
+------+
| 122 |
+------+
... View more
04-14-2023
02:36 AM
1 Kudo
@ygbaek , This is a known issue and is resolved in releases 7.1.8 and 7.2.16.0. What is the CDP version you are using? It looks like the use_start_tls is set to true by default. https://github.com/cloudera/hue/blob/master/desktop/conf.dist/hue.ini#L477 Hope this helps, Tarun Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs-up button.
... View more
- « Previous
- Next »