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

[GitHub] [iceberg] waywtdcc opened a new issue, #8508: Can sparksql ddl define primary key now?

waywtdcc opened a new issue, #8508:
URL: https://github.com/apache/iceberg/issues/8508

   ### Query engine
   
   spark
   
   ### Question
   
   Now can sparksql ddl define primary key, and attributes can also be used?


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
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] Can sparksql ddl define primary key now? [iceberg]

Posted by "jia-zhengwei (via GitHub)" <gi...@apache.org>.
jia-zhengwei commented on issue #8508:
URL: https://github.com/apache/iceberg/issues/8508#issuecomment-1822339610

   > You could check the doc here: https://iceberg.apache.org/docs/latest/spark-ddl/#alter-table--set-identifier-fields
   
   @ConeyLiu  What should I do after setting IDENTIFIER FIELDS ?  I can still insert into deduplicate rows by spark-sql cmd;
   
   ![image](https://github.com/apache/iceberg/assets/31585302/351c8894-056f-4c7c-a45e-015f29efb7f9)
   


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   Yes, `IDENTIFIER FIELDS` is mostly used in equality delete files. Right now only Flink has implemented the MOR with equality delete files.


-- 
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] Can sparksql ddl define primary key now? [iceberg]

Posted by "jia-zhengwei (via GitHub)" <gi...@apache.org>.
jia-zhengwei commented on issue #8508:
URL: https://github.com/apache/iceberg/issues/8508#issuecomment-1825179396

   > You should use `MERGE INTO` if you want to do upsert. `INSERT INTO` will append data instead of upsert data.
   
   Got it, Thanks.  


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   You should use `MERGE INTO` if you want to do upsert. `INSERT INTO` will append data instead of upsert data.


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   > You should use `MERGE INTO` to upsert in Spark. https://iceberg.apache.org/docs/latest/spark-writes/#merge-into
   
   Hi @ConeyLiu , IMHO, `MERGE INTO` has nothing to do with `IDENTIFIER FIELDS`? Right?


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   Got it. It seems that the document https://iceberg.apache.org/docs/latest/spark-ddl/#alter-table--set-identifier-fields will give users the misconception that Spark can use` IDENTIFIER FIELDS` to deduplicate data.
   
   


-- 
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] Can sparksql ddl define primary key now? [iceberg]

Posted by "jia-zhengwei (via GitHub)" <gi...@apache.org>.
jia-zhengwei commented on issue #8508:
URL: https://github.com/apache/iceberg/issues/8508#issuecomment-1823787054

   > Got it. It seems that the document https://iceberg.apache.org/docs/latest/spark-ddl/#alter-table--set-identifier-fields will give users the misconception that Spark can use` IDENTIFIER FIELDS` to deduplicate data.
   
   @zhangbutao Yes, it confused me also. 
   
   @ConeyLiu @zhangbutao Do you have any suggestion for using spark with duplicates data?


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   You should use `MERGE INTO` to upsert in Spark. https://iceberg.apache.org/docs/latest/spark-writes/#merge-into


-- 
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] Can sparksql ddl define primary key now? [iceberg]

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

   `IDENTIFIER FIELDS`  only work for Flink Streaming upsert.


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


[GitHub] [iceberg] ConeyLiu commented on issue #8508: Can sparksql ddl define primary key now?

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

   You could check the doc here: https://iceberg.apache.org/docs/latest/spark-ddl/#alter-table--set-identifier-fields


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