You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Toroidals (via GitHub)" <gi...@apache.org> on 2023/08/04 10:11:10 UTC

[GitHub] [seatunnel] Toroidals opened a new issue, #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Toroidals opened a new issue, #5225:
URL: https://github.com/apache/seatunnel/issues/5225

   ### Search before asking
   
   - [X] I had searched in the [feature](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   env {
     execution.parallelism = 1
     job.mode = "BATCH"
     spark.sql.catalogImplementation = "hive"
     spark.app.name = "seatunnel-hive-to-ck_"
     # spark.yarn.queue = "root.hive"
     spark.executor.instances = 2
     spark.executor.cores = 4
     spark.driver.memory = "3g"
     spark.executor.memory = "4g"
     spark.hadoop.hive.exec.dynamic.partition = "true"
     spark.hadoop.hive.exec.dynamic.partition.mode = "nonstrict"
     spark.sql.sources.partitionOverwriteMode = "dynamic"
     spark.executor.extraJavaOptions = "-Dfile.encoding=UTF-8"
     spark.driver.extraJavaOptions = "-Dfile.encoding=UTF-8"
   }
   
   source {
     Hive {
       metastore_uri = "thrift://xxx:9083"
       table_name = "dm.xxx"
       read_partitions = ["day_id=20230804"]
       result_table_name = "soure_table"
     }
   
   }
   
   transform {
   Sql {
       source_table_name = "soure_table"
       result_table_name = "sink_table"
       # 可正常执行: query = "select id,id1,id2,name,date01,timestamp01,decimal01,double01,'2023080401' as hour_id from soure_table"
       query = "select *,'2023080401' as hour_id from soure_table"  
   }
   }
   
   sink {
   Clickhouse {
       host = "xxx:8123"
       source_table_name = "sink_table"
       database = dm
       table = xxx
       username = "xxx"
       password = "xxx"
       clickhouse.confg = {
         max_rows_to_read = "100"
         read_overflow_mode = "throw"
             bulk_size = 100000
         retry = 3
       }
     }
   }
   
   想通过以上配置在transform 时使用sql添加字段hour_id ,但是目前 transform 不支持select *的写法
   
   ### Usage Scenario
   
   想通过以上配置在transform 时使用sql添加字段hour_id ,但是目前 transform 不支持select *的写法,将其改为:query = "select id,id1,id2,name,date01,timestamp01,decimal01,double01,'2023080401' as hour_id from soure_table"可正常执行,但是我需要配置的表很多,相通过select * 简化配置,达到配置文件可以共用的目的,希望后续版本能支持  transform sql中:select *的写法
   
   ### Related issues
   
   无
   
   ### Are you willing to submit a 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.apache.org

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


[GitHub] [seatunnel] github-actions[bot] closed issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法
URL: https://github.com/apache/seatunnel/issues/5225


-- 
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] [seatunnel] Toroidals commented on issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Posted by "Toroidals (via GitHub)" <gi...@apache.org>.
Toroidals commented on issue #5225:
URL: https://github.com/apache/seatunnel/issues/5225#issuecomment-1666392602

   修改 seatunnel-transforms-v2 的 org.apache.seatunnel.transform.sql.zeta.ZetaSQLEngine.init方法:


-- 
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] [seatunnel] chen0623-bak commented on issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Posted by "chen0623-bak (via GitHub)" <gi...@apache.org>.
chen0623-bak commented on issue #5225:
URL: https://github.com/apache/seatunnel/issues/5225#issuecomment-1669700788

   seatunnel sql transform Grammar analysis dependency on **jsqlParser**
   The specific error reported is here **ZetaSQLEngine class validateSQL method**
   ```java
               for (SelectItem selectItem : selectBody.getSelectItems()) {
                   if (selectItem instanceof AllColumns) {
                       throw new IllegalArgumentException("Unsupported all columns select syntax");
                   }
               }
   ```
   When select *
   selectItem instanceof AllColumns = true


-- 
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] [seatunnel] github-actions[bot] commented on issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5225:
URL: https://github.com/apache/seatunnel/issues/5225#issuecomment-1726709694

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
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] [seatunnel] 2416210017 commented on issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Posted by "2416210017 (via GitHub)" <gi...@apache.org>.
2416210017 commented on issue #5225:
URL: https://github.com/apache/seatunnel/issues/5225#issuecomment-1665375623

   I also found this issue. In previous versions of seatunel, it was possible to write this way, but now it seems that many of the previous features are not usable, and I think this is bad.
   
   


-- 
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] [seatunnel] github-actions[bot] commented on issue #5225: [Feature][Module Name] Transform V2 SQL无法支持select * from source_table 的写法

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5225:
URL: https://github.com/apache/seatunnel/issues/5225#issuecomment-1710915799

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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