You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "F7kyyy (via GitHub)" <gi...@apache.org> on 2024/07/30 02:44:02 UTC

[I] [Bug]使用Flink Sql从Mysql向Doris写数无法开启部分列更新 [doris]

F7kyyy opened a new issue, #38507:
URL: https://github.com/apache/doris/issues/38507

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   2.0.3-rc06
   
   ### What's Wrong?
   
   使用Flink SQL 方式从 MySQL 向 Doris 抽取数据,使用部分列更新;但是不想更新的列还是被空值覆盖了。
   ![image](https://github.com/user-attachments/assets/5b5722b5-2e10-41f7-bf2a-61bb83fcff25)
   ![image](https://github.com/user-attachments/assets/e8526e86-8d03-452c-bc77-5897915914c2)
   
   ### What You Expected?
   
   Flink SQL 做数据导入时有部分列更新,更新name字段,其他保持不变
   
   ### How to Reproduce?
   
   ## Flink 版本
   1.17.2
   ## flink-doris-connector 版本
   1.17-1.6.1
   ## Doris建表语句
   ```sql
   CREATE TABLE IF NOT EXISTS flinkImportUnique_partial (
       user_id BIGINT,
       name VARCHAR(20),
       age INT,
       op_time DATETIME
   ) UNIQUE KEY(`user_id`) DISTRIBUTED BY HASH(`user_id`) BUCKETS 1 PROPERTIES (
       "replication_allocation" = "tag.location.default: 1",
       "enable_unique_key_merge_on_write" = "true"
   );
   ```
   ## Flink 语句
   ### Mysql jdbc Source
   ```sql
   CREATE TABLE MysqlFlinkExportToDorisUnique (
       user_id BIGINT,
       name VARCHAR(20),
       age INT,
       op_time TIMESTAMP,
       PRIMARY KEY(user_id) NOT ENFORCED
   ) WITH (
       'password' = '********',
       'connector' = 'jdbc',
       'driver' = 'com.mysql.jdbc.Driver',
       'table-name' = 'flinkexportdorisuniq',
       'url' = 'jdbc:mysql://***.***.***.***:3306/flink?useOldAliasMetadataBehavior=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8',
       'username' = 'root'
   );
   ```
   ### Doris Sink
   ```sql
   CREATE TABLE flinkImportToDorisUnique_partial (
       user_id BIGINT,
       name STRING,
       age INT,
       op_time TIMESTAMP,
       PRIMARY KEY(user_id) NOT ENFORCED
   ) WITH (
       'password' = '********',
       'connector' = 'doris',
       'fenodes' = '***.***.***.***:8030',
       'table.identifier' = 'demo.flinkImportUnique_partial',
       'sink.properties.partial_columns' = 'true',
       'sink.properties.column' = 'user_id,name,__DORIS_DELETE_SIGN__',
       'username' = 'root'
   );
   ```
   ### 加工语句
   ```sql
   INSERT INTO flinkImportToDorisUnique_partial(user_id,name)
   SELECT user_id,name
   from MysqlFlinkExportToDorisUnique;
   ```
   
   ### Anything Else?
   
   _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@doris.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug]使用Flink Sql从Mysql向Doris写数无法开启部分列更新 [doris]

Posted by "bobhan1 (via GitHub)" <gi...@apache.org>.
bobhan1 commented on issue #38507:
URL: https://github.com/apache/doris/issues/38507#issuecomment-2257930279

   `sink.properties.column` should be `sink.properties.columns`


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug]使用Flink Sql从Mysql向Doris写数无法开启部分列更新 [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #38507: [Bug]使用Flink Sql从Mysql向Doris写数无法开启部分列更新
URL: https://github.com/apache/doris/issues/38507


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug]使用Flink Sql从Mysql向Doris写数无法开启部分列更新 [doris]

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

   We're closing this issue because it hasn't been updated in a while.
   If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org