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

[GitHub] [flink-table-store] zhangjun0x01 commented on a diff in pull request #547: [FLINK-31128] Add Create Table As for flink table store

zhangjun0x01 commented on code in PR #547:
URL: https://github.com/apache/flink-table-store/pull/547#discussion_r1111669015


##########
docs/content/docs/how-to/creating-tables.md:
##########
@@ -114,6 +114,78 @@ Partition keys must be a subset of primary keys if primary keys are defined.
 By configuring [partition.expiration-time]({{< ref "docs/maintenance/manage-partition" >}}), expired partitions can be automatically deleted.
 {{< /hint >}}
 
+## Create Table As
+
+Tables can also be created and populated by the results of a query. 
+
+{{< tabs "create-table-as" >}}
+
+{{< tab "Flink" >}}
+
+// Flink will create target table first and then start a `INSERT INTO target_table SELECT * FROM source_table` job,
+// for batch mode, the job will exit when the job finished, for streaming mode, the job will not exit.

Review Comment:
   For spark,it has not problems ,after the operation, we can get the correct result ,and read the correct the data from the target table, but for flink. the default mode is streaming mode ,  we need to enable the checkpoint , but if the user forgot to enable the checkpoint , we will can not get data from the target table , user will be confused , why the same operation, it is fine for spark ,but it is not fine for flink ,so I add the explanation



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

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