You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/02/23 13:02:14 UTC

[GitHub] [incubator-seatunnel] zzp15222522401 opened a new issue #1318: cannot write data from mysql to hive

zzp15222522401 opened a new issue #1318:
URL: https://github.com/apache/incubator-seatunnel/issues/1318


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   This parameter [SQL] in the hive sink parameter is required. If this parameter is not added, it will appear, but I don't see the description in the official document. After adding this parameter, the table that needs to insert data in the SQL statement will pop up an error and can't find the corresponding table if it is not created in hive. Logically, it should be created without this table? Or do you need to build a table in advance before you can use it?
   
   ### SeaTunnel Version
   
   2.0.5 dev
   
   ### SeaTunnel Config
   
   ```conf
   This is a hive sink without SQL parameters configured:
   sink{
       Hive{
           source_table_name = "mytable2"
           result_table_name = "test.seatunnel_test_tbl_v1"
           partition_by = ["dt"]
           save_mode = "append"
       }
   }
   This is the hive sink for which the SQL parameter must be configured:
   sink{
       Hive{
           source_table_name = "mytable2"
           result_table_name = "test.seatunnel_test_tbl_v1"
           partition_by = ["dt"]
           save_mode = "append"
           sql = "insert into test.seatunnel_test_tbl_v1 partition(dt) select * from mytable2"
       }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   1
   ```
   
   
   ### Error Exception
   
   ```log
   ERROR seatunnel.Seatunnel: Plugin[org.apache.seatunnel.spark.sink.Hive] contains invalid config, error: please specify [sql] as non-empty 
   
   
   Caused by: org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view 'seatunnel_test_tbl_v1' not found in database 'test';
   ```
   
   
   ### Flink or Spark Version
   
   spark-2.4.8
   
   ### Java or Scala Version
   
   jdk1.8
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-seatunnel] zzp15222522401 closed issue #1318: cannot write data from mysql to hive

Posted by GitBox <gi...@apache.org>.
zzp15222522401 closed issue #1318:
URL: https://github.com/apache/incubator-seatunnel/issues/1318


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org