(
(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 (DataType 'String))
(let $6 (OptionalType $5))
(let $7 '('"color" $6))
(let $8 '('"value" $6))
(let $9 (PqTopic '"pq" '"local" '"test_topic_input" '('('"PartitionsCount" '"1")) '('('"system" '_yql_sys_offset)) (StructType $7 $8)))
(let $10 '('"SharedReading" '"1"))
(let $11 '('('"Consumer" '"test_client") '('"Endpoint" '"<pq_pq_endpoint>") $10 '('"ReconnectPeriod" '"") '('"Format" '"json_each_row") '('"ReadGroup" '"fqrun") '('"UseSsl" '"1")))
(let $12 (StructType '('_yql_sys_offset (DataType 'Uint64)) $7 $8))
(let $13 (DqPqTopicSource world $9 '('"color" '"value") $11 (SecureParam '"cluster:default_pq") '"" $12 '""))
(let $14 (DqStage '((DqSource $4 $13)) (lambda '($19) (block '(
  (let $20 '('('"format" '"json_each_row") '('"metadataColumns" '('_yql_sys_offset)) '('"formatSettings" '('('"data.datetime.formatname" '"POSIX") '('"data.timestamp.formatname" '"POSIX"))) '('"settings" '($10))))
  (let $21 (DqSourceWideWrap $19 $4 $12 $20))
  (return (FlatMap (NarrowMap $21 (lambda '($22 $23 $24) (AsStruct '('_yql_sys_offset $22) '('"color" $23) '('"value" $24)))) (lambda '($25) (Just (AsStruct '('"color" (Member $25 '"color")) '('"offset" (SafeCast (Member $25 '_yql_sys_offset) $5)) '('"value" (Member $25 '"value")))))))
))) '('('"_logical_id" '0))))
(let $15 (DqStage '((DqCnUnionAll (TDqOutput $14 '"0"))) (lambda '($26) $26) '('('"_logical_id" '0))))
(let $16 '('"value" '"color" '"offset"))
(let $17 '('('type) '('autoref) '('columns $16)))
(let $18 (ResPull! $2 $3 (Key) (DqCnResult (TDqOutput $15 '"0") '()) $17 '"dq"))
(return (Commit! (Commit! $18 $3) (DataSink '"pq" '"pq")))
)
