How to return SQL cell type annotation in a custom database client?

Hi there,

We have a custom database client we maintain internally for reasons that have to do with authentication. It’s sort of an offshoot of the AWS Athena client I published here, though it actually handles responses that look almost like the database proxy but fetches and returns them with custom JavaScript. In the last few days I’ve been seeing “undefined” appear under all the field names in results:

I assume this is meant to display typing information, but I’m unsure how to return that with results from a JS client. Right now our SQL function returns result rows as an array. I see the database proxy returns a schema with queries, which we could do, but how would we then return that in a way the interface would understand? I looked for examples of this sort of thing in the official SQL cell docs and those display “undefined” too.


They may just have published a fix What does `undefined` mean in the sql table? · Issue #405 · observablehq/feedback · GitHub

1 Like

@asg017 is correct! Please let us know if this is now working for you. You should not need to provide typing information, since we infer it from the results.

It is, thanks!

1 Like