-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add SQL context field for stress.json #26
Comments
the ODBC example is a different thing with the context (this is a go construct), obviously the http side is trivial, not as sure for ODBC |
Yeah, I would already be happy with an HTTP context and for ODBC context can be ignored (for now). |
I'd like to avoid partial support if I could, but this is doable with odbc (just not as nice) I can do one of the following Strategy 1
Strategy 2
The downside of strategy 2 is that will for sure hurt query throughput when using contexts with odbc, the downside of strategy 1 is more open files..managing connections etc..also complexity. I may start with 1 since I'm not sure how to set the context back to default with USE |
ok some follow up tried both methods..odbc just hard crashes..not sure why yet, will have to revist the http method is not so simple as you have to express the path as an array ( I guess one could argue you have to push that back on the user) -data-raw '{ this is harder than it looks at first glance |
Hey Ryan, |
Having a field to pass in a SQL context via stress.json would allow us to replay any query that we find in queries.json files or job profiles.
Example stress.json:
{ "queries": [ { "query": "SELECT * FROM \"SF weather 2018-2019.csv\" LIMIT 50", "context": ["Samples", "samples.dremio.com"], "frequency": 1 } ] }
Required code changes for HTTP
Add context field here: https://github.com/rsvihladremio/dremio-stress/blob/main/pkg/protocol/protocol_http.go#L59-L62
For ODBC:
Add context parameter: https://pkg.go.dev/database/sql#example-DB.ExecContext
The text was updated successfully, but these errors were encountered: