Skip to content

Feature Support: Generic Query, How to get schema and data while query? #53

Closed as not planned
@lshoo

Description

@lshoo

Hi,
Clickhouse is an OLAP database and I want to make a generic query engine where users can enter any query SQL and return query results, including returning schema and data, and then the application layer displays the data. When querying, the user does not have to specify the data type.

The query result is a two-dimensional data, where one array is the column name and the other data is also a two-dimensional data, e.g., but the schema is not fixed

{
	"schema": ["id","name", "age","birthday"],
	"data": [
		["20", ”james1, "18", "2000-01-01"],
		["21", ”james2, "19", "2000-01-01"],
		["22", ”james2, "10", "2000-01-01"],
		["23", ”james4, "30", "2000-01-01"],
		["24", ”james5, "26", "2000-01-01"]
		...
	]
}

How to do that? thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions