Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-15407

Add document to explain how to write a table with PK

    XMLWordPrintableJSON

Details

    Description

      I have had several user problems:

      Why is an error reported when writing the upsertsink: TableException: UpsertStreamTableSink requires that Table has a full primary keys if it is updated.

      Users are confused.

      I think we can consider writing a document to describe it.

      User need careful like:

       

      insert into result_table select pk1, if(pk2 is null, '', pk2) as pk2, count(*), sum(f3) from source group by pk1, pk2; 

      This will failed.

       

      insert into result_table select pk1, pk2, count(*), sum(f1) from (select pk1, if(pk2 is null, '', pk2) as pk2, f1 from source) group by pk1, pk2; 
      

      This can work.

      Attachments

        Issue Links

          Activity

            People

              lzljs3620320 Jingsong Lee
              lzljs3620320 Jingsong Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: