Apologies it was a mistake by me. The correct syntax is without additional ()
*print(streamingDummy.isStreaming)* It returns True Thanks view my Linkedin profile <https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/> *Disclaimer:* Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction. On Wed, 21 Apr 2021 at 23:34, Mich Talebzadeh <[email protected]> wrote: > Hi, > > I am testing something in Spark Structured Streaming, this is a new topic > > Typical kafka json row > > dummy2 = StructType().add("uuid", StringType()).add("timecreated", > TimestampType()).add("status", StringType()) > > # example > ##856095c6-cdec-485b-9da6-d78275bc0a25 > {"uuid":"856095c6-cdec-485b-9da6-d78275bc0a25", > "timecreated":"2021-04-21T23:29:16", "status":true"} > > Created the Streaming read > > > streamingDummy = self.spark \ > .readStream \ > .format("kafka") \ > .option("kafka.bootstrap.servers", > config['MDVariables']['bootstrapServers'],) \ > .option("schema.registry.url", > config['MDVariables']['schemaRegistryURL']) \ > .option("group.id", config['common']['dummy']) \ > .option("zookeeper.connection.timeout.ms", > config['MDVariables']['zookeeperConnectionTimeoutMs']) \ > .option("rebalance.backoff.ms", > config['MDVariables']['rebalanceBackoffMS']) \ > .option("zookeeper.session.timeout.ms", > config['MDVariables']['zookeeperSessionTimeOutMs']) \ > .option("auto.commit.interval.ms", > config['MDVariables']['autoCommitIntervalMS']) \ > .option("subscribe", config['MDVariables']['topicdummy']) \ > .option("failOnDataLoss", "false") \ > .option("includeHeaders", "true") \ > .option("startingOffsets", "latest") \ > .load() \ > .select(from_json(col("value").cast("string"), > dummy2).alias("dummy_value")) > > streamingDummy.printSchema() > *print(streamingDummy.isStreaming())* > > When I run it I get > > > root > > |-- dummy_value: struct (nullable = true) > > | |-- uuid: string (nullable = true) > > | |-- timecreated: timestamp (nullable = true) > > | |-- status: string (nullable = true) > > > *'bool' object is not callable, quitting* > > I cannot figure out the last line! > > > Thanks > > > view my Linkedin profile > <https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/> > > > > *Disclaimer:* Use it at your own risk. Any and all responsibility for any > loss, damage or destruction of data or any other property which may arise > from relying on this email's technical content is explicitly disclaimed. > The author will in no case be liable for any monetary damages arising from > such loss, damage or destruction. > > >
