Can't select on table while KafkaExport is running?

HyeontaeJuHyeontaeJu Vertica Customer

Can't select on table while KafkaExport is running?

Answers

  • HibikiHibiki Vertica Employee Employee

    You can. Did you see any locking issue? The following is the result when I tried.

    [Session #1]

    dbadmin=> SELECT SYSDATE;
              sysdate
    ----------------------------
     2021-09-26 06:44:05.768293
    (1 row)
    
    dbadmin=> SELECT KafkaExport(
    dbadmin->          server, id::VARCHAR, CONCAT(CONCAT(date, ', '), data_value)
    dbadmin->          USING PARAMETERS brokers='10.0.0.7:9092,10.0.0.8:9092,10.0.0.9:9092',
    dbadmin->                           topic='iot_results'
    dbadmin->        ) OVER (PARTITION BEST) FROM iot_report LIMIT 1000000;
     partition | key | message | failure_reason
    -----------+-----+---------+----------------
    (0 rows)
    
    dbadmin=> SELECT SYSDATE;
              sysdate
    ---------------------------
     2021-09-26 07:10:44.43091
    (1 row)
    

    [Session #2]

    dbadmin=> SELECT SYSDATE;
              sysdate
    ----------------------------
     2021-09-26 06:48:17.050536
    (1 row)
    
    dbadmin=> SELECT TRUNC(date, 'MM') AS month, count(*)
    dbadmin-> FROM iot_report
    dbadmin-> GROUP BY 1
    dbadmin-> ORDER BY 1;
            month        |  count
    ---------------------+---------
     2010-01-01 00:00:00 | 2678400
     2010-02-01 00:00:00 | 2419200
     2010-03-01 00:00:00 | 2678400
     2010-04-01 00:00:00 | 2505601
    (4 rows)
    
    dbadmin=> SELECT SYSDATE;
              sysdate
    ----------------------------
     2021-09-26 06:48:17.173549
    (1 row)
    

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file