(
(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 '('"value" (OptionalType (DataType 'String))))
(let $6 (PqTopic '"pq" '"local" '"test_topic_input" '('('"PartitionsCount" '"1")) '('('"system" '_yql_sys_offset)) (StructType $5)))
(let $7 '('"SharedReading" '"1"))
(let $8 '('('"Consumer" '"test_client") '('"Endpoint" '"<pq_pq_endpoint>") $7 '('"ReconnectPeriod" '"") '('"Format" '"json_each_row") '('"ReadGroup" '"fqrun") '('"UseSsl" '"1")))
(let $9 (StructType '('_yql_sys_offset (DataType 'Uint64)) $5))
(let $10 (DqPqTopicSource world $6 '('"value") $8 (SecureParam '"cluster:default_pq") '"B\x1B\b\x03\x12\a\x12\x05value\x1A\x0E\n\f\n\x03\b\x81 \x12\x05B\x03123" $9 '""))
(let $11 (DqStage '((DqSource $4 $10)) (lambda '($15) (block '(
  (let $16 '('('"format" '"json_each_row") '('"metadataColumns" '('_yql_sys_offset)) '('"formatSettings" '('('"data.datetime.formatname" '"POSIX") '('"data.timestamp.formatname" '"POSIX"))) '('"settings" '($7))))
  (let $17 (DqSourceWideWrap $15 $4 $9 $16))
  (return (FlatMap (NarrowMap $17 (lambda '($18 $19) (AsStruct '('_yql_sys_offset $18) '('"value" $19)))) (lambda '($20) (OptionalIf (Coalesce (== (Member $20 '"value") (String '"123")) (Bool 'false)) (AsStruct '('"offset" (Member $20 '_yql_sys_offset)))))))
))) '('('"_logical_id" '0))))
(let $12 (DqStage '((DqCnUnionAll (TDqOutput $11 '"0"))) (lambda '($21) $21) '('('"_logical_id" '0))))
(let $13 '('('type) '('autoref) '('columns '('"offset"))))
(let $14 (ResPull! $2 $3 (Key) (DqCnResult (TDqOutput $12 '"0") '()) $13 '"dq"))
(return (Commit! (Commit! $14 $3) (DataSink '"pq" '"pq")))
)
