(
(let $1 (Configure! world (DataSource '"config") '"DqEngine" '"force"))
(let $2 (Configure! $1 (DataSource '"pq" '"$all") '"Attr" '"consumer" '"test_client"))
(let $3 (DataSink 'result))
(let $4 (DataSource '"pq" '"pq"))
(let $5 (PqTopic '"pq" '"local" '"test_topic_input" '('('"PartitionsCount" '"1")) '('('"system" '_yql_sys_offset)) (StructType)))
(let $6 '('"SharedReading" '"1"))
(let $7 '('('"Consumer" '"test_client") '('"Endpoint" '"<pq_pq_endpoint>") $6 '('"ReconnectPeriod" '"") '('"Format" '"json_each_row") '('"ReadGroup" '"fqrun") '('"UseSsl" '"1")))
(let $8 (StructType '('_yql_sys_offset (DataType 'Uint64))))
(let $9 (DqPqTopicSource world $5 '() $7 (SecureParam '"cluster:default_pq") '"" $8 '""))
(let $10 (DqStage '((DqSource $4 $9)) (lambda '($14) (block '(
  (let $15 '('('"format" '"json_each_row") '('"metadataColumns" '('_yql_sys_offset)) '('"formatSettings" '('('"data.datetime.formatname" '"POSIX") '('"data.timestamp.formatname" '"POSIX"))) '('"settings" '($6))))
  (let $16 (DqSourceWideWrap $14 $4 $8 $15))
  (return (FlatMap (NarrowMap $16 (lambda '($17) (AsStruct '('_yql_sys_offset $17)))) (lambda '($18) (Just (AsStruct '('"offset" (Member $18 '_yql_sys_offset)))))))
))) '('('"_logical_id" '0))))
(let $11 (DqStage '((DqCnUnionAll (TDqOutput $10 '"0"))) (lambda '($19) $19) '('('"_logical_id" '0))))
(let $12 '('('type) '('autoref) '('columns '('"offset"))))
(let $13 (ResPull! $2 $3 (Key) (DqCnResult (TDqOutput $11 '"0") '()) $12 '"dq"))
(return (Commit! (Commit! $13 $3) (DataSink '"pq" '"pq")))
)
