Comments (3)
Hi @fenix01,
forget my previous answer, I was wrong.
Lines 90 to 93 in 895ad65
The Header contains Colum Data
Lines 96 to 99 in 895ad65
fmt.Printf("%s\n",header.QueryId)
Here is the code how the header processing is working:
Lines 115 to 132 in 895ad65
from ksqldb-go.
Hi @thmeitz !
Thank you for your response. I tried to understand your current message and the first one. But I don't understand how I can access the column name with the headerChannel variable.
If I understand correctly you say that I should not be able to read from the header channel while processing the row channel. But my printf function is able to display the header from the row channel. But I cannot access the Columns field, neither its QueryId field.
I would like to parse a row and know what is the corresponding column name. But it doesn't work.
from ksqldb-go.
Finally I found the problem @thmeitz !
I was using ksqldb-go in version v0.0.4 because it is the latest version in the release page. But in this version the Header struct is written like this.
Lines 113 to 116 in 7babf9f
As you can see, all fields are in lowercase and are not exposed to the outside. So I cannot access columns field from my code.
It has been changed in the master branch :
Lines 90 to 93 in 895ad65
I added the library by pointing to the latest commit and now it works correctly.
go get github.com/thmeitz/ksqldb-go@895ad659e4025274b4d4ddbaae941903525f078a
from ksqldb-go.
Related Issues (19)
- [client] set correct request headers
- [execute] Add support for commandSequenceNumber and streamsProperties
- [execute] Add better support for responses to CREATE/DROP/TERMINATE
- [BaseAuth] implement / test baseAuth
- [examples] move examples to ksqldb-go-examples
- [changelog] provide better changelog
- [go doc] write docs for all public methods
- [ksqldb REST API] implement all endpoints
- [refactor] push, pull queries
- [ksqldb-v0.22.x] update Parser / Antlr4 to support new release
- [close-push-query] implement
- Possible SQL Injection on ksqldb HOT 2
- [utils] SanitizeQuery only works when there is a space after \n HOT 7
- Add support for context HOT 6
- DialTLS is deprecated
- [gosec:G104] fix SQL string concatenation with QueryBuilder
- [gosec:G402] Remove InsecureSkipVerify
- [gosec:G104] fix unhandled error in heartbeat (pull)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksqldb-go.