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

[GitHub] [incubator-seatunnel] hailin0 opened a new issue, #4606: [Feature][Jdbc] Improve sqlserver sink

hailin0 opened a new issue, #4606:
URL: https://github.com/apache/incubator-seatunnel/issues/4606

   ### Search before asking
   
   - [X] I had searched in the [feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   Currently jdbc SqlServerDialect using `INSERT INTO ${database}.${table}`
   
   https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/sqlserver/SqlServerDialect.java
   https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java#L78
   
   
   
   SQLServer SQL only allows `${database}.${schema}.${table}` or `${schema}.${table}` as table identifier
   
   Changes
   ```java
           // pseudocode
           String sqlServerTable;
           String[] tableNames = tableName.split("\\.");
           if (tableNames.length == 1 || tableNames.length == 3) {
               sqlServerTable = tableName;
           } else if (tableNames.length == 2) {
               sqlServerTable = database + "." + tableName;
           } else {
               throw new IllegalArgumentException();
           }
           return String.format("INSERT INTO %s (%s) VALUES (%s)",
               sqlServerTable, columns, placeholders);
   ```
   
   
   *Validate*
   
   Add e2e testcase
   
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] 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] [incubator-seatunnel] CodingGPT commented on issue #4606: [Feature][Jdbc] Improve sqlserver sink

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

   pls assigned to me tks


-- 
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 #4606: [Feature][Jdbc] Improve sqlserver sink

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

   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


[GitHub] [seatunnel] github-actions[bot] commented on issue #4606: [Feature][Jdbc] Improve sqlserver sink

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

   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] github-actions[bot] closed issue #4606: [Feature][Jdbc] Improve sqlserver sink

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4606: [Feature][Jdbc] Improve sqlserver sink
URL: https://github.com/apache/seatunnel/issues/4606


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