-
Notifications
You must be signed in to change notification settings - Fork 40
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
Executing '.show databases' via Mgmt call returns nothing but outputs error. #11
Comments
Was able to replicate. Tracked this down to being a translation of V1 frame type information. Mgmt uses the v1 frames, which output column type data in every frame. That type data has two different fields to describe the column data:
DataType is the .Net equivalent name. ColumnType is the Kusto name. But most of the time ColumnType is empty and we have to translate off the DataType. There was a bad assumption on some of the names, so we were not translating "boolean" into Bool. I added translation for every name and alias listed in the docs. Our internal integration tests were exclusively using Mgmt() for making changes and not reading data, hermetic tests of course wouldn't catch this if our assumptions were wrong. Added a regression in the integration tests. Made the error drop more relevant information related to this problem. Haven't tracked why this error wasn't returned and displayed yet. Will update soonish. |
Iter.Do(), when replicated returns an error and does not make calls to log. Since there are a few paths you could be doing, want to make sure we cover the right one. Can you output the Mgmt() call + iteration code? |
Ah, got it. I misspoke. An error is returned, but not from Mgmt (which is correct). It's returning from the Next() call [where the parsing is occurring]. It's a very simple test program where I iterate through a variety of commands to pass through to Mgmt, see what errors come back,interrogate the rows, etc. It's basically: rows, err := kustoClient.Mgmt(ctx, db, ddl)
if err != nil {
fmt.Println("Mgmt Error:", err)
break
}
for {
row, err := rows.Next()
if err != nil {
if err == io.EOF {
break
}
fmt.Println("Row Error:", err)
break
}
fmt.Printf("%#v\n", row)
} ..and the output is: Which means an error from Mgmt itself wasn't returned, but the ColumnType error was returned from the first rows.Next() call. |
Thanks for that. That confirms we are getting an error output and there wasn't another issue. I've pushed out a release 0.1.1 that addresses this issue. Any further problems on this issue, please feel free to re-open. |
It outputs
on the screen but doesn't actually return an error. There are apparently still cases where Kusto returns aren't being translated properly.
This is with the 0.1 pre-release.
The text was updated successfully, but these errors were encountered: