kafka-ops / julie

A solution to help you build automation and gitops in your Apache Kafka deployments. The Kafka gitops!
MIT License
417 stars 113 forks source link

Not seeing session variables #547

Open amalagaura opened 1 year ago

amalagaura commented 1 year ago

Not able to use session variables We tried adding session variables per the examples in the #544

To Reproduce

bin/julie-ops.jar  --version
4.4.1
context: context
env: dev
projects:
  - name: ksqldb-project
    ksql:
      artefacts:
        vars:
          streamname: ksqlb_stream_name_test
        streams:
          - path: ../ksqldb/test.sql
            name: ksql_test_stream
CREATE STREAM ${streamname}
(
ORGIDKEY STRUCT<ORG_ID INTEGER> KEY,
ORG_ABBR VARCHAR
)
WITH

Expected behavior Session variables added to KSQLDB request

Screenshots

Following is log from KSQLDB

', configOverrides={}, requestProperties={}, sessionVariables={}, commandSequenceNumber=Optional.empty}, reason:  (io.confluent.ksql.rest.server.resources.KsqlResource)
io.confluent.ksql.parser.exception.ParseFailedException: Illegal argument at Line: 1, Col: 15. Source names may only contain alphanumeric values, '_' or '-'. Got: '${STREAMNAME}'
Statement: CREATE STREAM ${streamname}

Runtime (please complete the following information): KSQLDB Version: docker.io/confluentinc/cp-ksqldb-server:7.1.0

Additional context We are able to use variable substitutions in the KSQL-CLI without any issue