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
Support system tables #24972
Comments
Partitions doesn't make sense to bring over as OSS doesn't use the same scheme. We'll want to have a system table for listing parquet files I think. |
I was wondering about that since partitions are really a distributed thing. It looks like we do fabricate a partition ID, but I guess that is mostly to satisfy the Either way, as long as there is no compatibility issues, I suppose we could have a |
Yeah, the partition ID is just a stub to satisfy the trait. For the |
Distributed doesn't enable system tables unless you set a special debug flag to avoid the potential issue of returning a massive amount of stuff. One thing you could do is basically require a That would be implemented by
|
@alamb I'm looking at the system tables as an API for users to find out information like schema, the parquet files that exist, and other information about the data itself. So it's ultimately something I'd like in both Monolith and Distributed for consistency. Are system tables the right place to put this? We could have a REST API to get at this information instead, but I thought that just having it in the query language might be easier for users. |
Makes sense to me
I think there are different opinions on this topic I personally like system tables as then you have immediate filtering/joining/aggregation via SQL without any additional tools However, I believe others prefer REST APIs so that it is easier to use other tools for analysis. |
Having it in the query language would expose it via the /query API, which may not be as convenient as dedicated endpoints, but is still workable. We could then hook up dedicated REST endpoints if people desire them. I guess one issue would be if the info we want returned is not tabular, then representing it in a SQL response may be problematic. In which case, REST would be better to begin with. That is not the case with the current system tables in iox though, and I don't think would be for listing out parquet file info. |
That is a good point -- DataFusion / Rust can handle structured types (e.g StructArray, MapArray and ListArray) but the support is definitely not a full featured as it could be |
To add some detail, the
|
Right, well in that case, I suppose we are covered there - structured type support will be improved in DF if we need it 😃 I would prefer to make it available via the query language first, because as @alamb mentioned it gives users a fair bit of capability out of the box. I think it is also easy for us to extend, and easy for users to adopt extensions, as they just write different SQL queries. |
❤️ |
There are PRs up to resolve all sub-issues above, I'll summarize them here, as it would be easier to review them in the following sequence:
|
This is a parent issue for adding support for system tables to
influxdb3
.This is to provide system level debug information via queries such as those available in distributed versions of
influxdb3
:system.compactor
(only on pro): contains info on total number of LN files as well as their total size for each partitionsystem.queries
: contains a log of queries performed, including various pieces of info and state indicators for each querysystem.parquet_files
(new): list parquet files for a given database and tablesystem.tables
andsystem.partitions
, which are included in distributed version ofinfluxdb3
, are not relevant in monolith mainly because there is no concept of partitions here.It is worth noting that the SQL standard
information_schema
tables are already supported via DataFusion and can be accessed with queries likeSHOW TABLES
andSHOW COLUMNS FROM <table_name>
ininfluxdb3
today.Tasks
QueryDatabase
in thequery_executor
using core traits/types #24986system.queries
provider #24987system
tables available via a debug option in the HTTP API andinfluxdb3
client #24989system.parquet_files
provider #24988The text was updated successfully, but these errors were encountered: