Skip to content
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

[feature]: create table #1010

Open
stone1100 opened this issue Jan 17, 2024 · 2 comments
Open

[feature]: create table #1010

stone1100 opened this issue Jan 17, 2024 · 2 comments
Labels
feature New feature

Comments

@stone1100
Copy link
Member

Is your feature request related to a problem? Please describe.
Schema can be predefined by creating table statement.

create table (
host tag,
region tag,
cpu_load gauge,
cpu_usage gauge
)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@stone1100 stone1100 added the feature New feature label Jan 17, 2024
@joyant
Copy link
Contributor

joyant commented Jan 23, 2024

Do you mean?

create table [if not exist] table_name 
(
    tag_definition [, tag_definition] ...
    field_definition [, field_definition] ...
)

tag_definition:
    tag_name tag
    
field_definition:
    field_name {min | max | first | last | sum}

For example:

create table if not exist cpu 
(
    host tag,
    ip tag,
    load last,
    temperature max
);

@stone1100
Copy link
Member Author

stone1100 commented Jan 24, 2024

Yes.
The current SQL parsing is not flexible. Currently parsing is being refactored, and this feature depends on #1015 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants