Accessing HubDB Table Info via HubL


I’m hitting an issue when attempting to access HubDb table info via HubL, using the table_info function. Looping through the result and then attempting to access the ‘type’ attribute doesn’t seem to be possible. I’ve tried {{ column.attr(‘type’) }} , {{ column.type }}, {{ column[‘type’] }}, all return either null (when casting to string) or a blank value. I can access the name and the id using any of these mechanisms, so they clearly work - I examined the output and the type variable seems to be a constant or similar as its not wrapped in single quotes as string variables are.

Has anybody experienced similar? I’d love to access this server side instead of having to authenticate and use the JS API.


@karl You should try using the hubdb_table_column instead. Here is a link to the docs that will explain how to use it.


@pmanca, this is effectively the same endpoint, already tried it.

I ended up speaking with David Adams who has confirmed that the behaviour is the result of a bug on the HS side. I’ll post here once resolved.


Thanks for letting us know. This issue is fixed now.


Thanks @boulter, much appreciated.