You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "yeunghl-shoalter (via GitHub)" <gi...@apache.org> on 2023/12/06 05:00:06 UTC

[I] Timestamp data losing precision when Flink writing to Iceberg [iceberg]

yeunghl-shoalter opened a new issue, #9229:
URL: https://github.com/apache/iceberg/issues/9229

   ### Apache Iceberg version
   
   1.4.2 (latest release)
   
   ### Query engine
   
   Flink
   
   ### Please describe the bug 🐞
   
   When writing data (timestamp with timezone precision 3) into Iceberg table, the value would store with precision 0. Sure that the source provides values of millisecond. Is there a problem when Flink writing timestamp that having different precision with the Iceberg data type? Or there is other cause? Any solution to this? Thanks.
   
   Flink CDC MySQL connector as source and Iceberg as sink.
   
   Flink SQL
   ```
   CREATE TABLE `abcd` (
       `__operation_timestamp` TIMESTAMP_LTZ(3) METADATA FROM 'op_ts' VIRTUAL
     ) WITH (
       'connector'='mysql-cdc',
       'hostname'='abcd',
       'port'='8000',
       'username'='abcd',
       'password'='abcd',
       'database-name'='abcd',
       'table-name'='abcd'
   );
   
   INSERT INTO `abcd`.`abcd`.`abcd`
   (
     `operation_timestamp`
   )
   SELECT
     `__operation_timestamp` AS `operation_timestamp`
   FROM `abcd`;
   ```
   View Iceberg table with Superset + Trino
   ![image](https://github.com/apache/iceberg/assets/105259054/6df8c4ad-f033-48da-a74b-8b95bcd992db)
   ![image](https://github.com/apache/iceberg/assets/105259054/7f187eb6-32bb-455b-809f-439ed3c618ed)
   
   


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Timestamp data losing precision when writing with Flink [iceberg]

Posted by "yeunghl-shoalter (via GitHub)" <gi...@apache.org>.
yeunghl-shoalter closed issue #9229: Timestamp data losing precision when writing with Flink
URL: https://github.com/apache/iceberg/issues/9229


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Timestamp data losing precision when writing with Flink [iceberg]

Posted by "yeunghl-shoalter (via GitHub)" <gi...@apache.org>.
yeunghl-shoalter commented on issue #9229:
URL: https://github.com/apache/iceberg/issues/9229#issuecomment-1846456239

   It is found that Flink CDC MySQL can only provide event with source operation timestamp in precision of second. This is not an issue of converting Flink data into Iceberg data.
   ```
       "source": {
         "version": "1.9.7.Final",
         "connector": "mysql",
         "name": "mysql_binlog_source",
         "ts_ms": 1701938009000,
         "snapshot": "false",
         "db": "inventory",
         "sequence": null,
         "table": "customers",
         "server_id": 223344,
         "gtid": null,
         "file": "mysql-bin.000003",
         "pos": 4014,
         "row": 0,
         "thread": 14,
         "query": null
       }
   ```


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org