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

List the structure of the file() function for various formats #2536

Open
danthegoodman1 opened this issue Jul 29, 2024 · 3 comments
Open

List the structure of the file() function for various formats #2536

danthegoodman1 opened this issue Jul 29, 2024 · 3 comments
Assignees
Labels

Comments

@danthegoodman1
Copy link

The docs do not indicate what the column from each format when using https://clickhouse.com/docs/en/sql-reference/table-functions/file

For example using 'LineAsString' returns the line column. Nowhere (that I could reasonably find) is this documented.

The shortcut was to make a crap tiny file and print out the select so I could see what the columns are.

I am also not sure there is a function to read the columns returned by a subquery so that I could use a query to inspect it like:

select columns(select * from file('...', 'LineAsString'))
@danthegoodman1
Copy link
Author

Ok so they are not listed in https://clickhouse.com/docs/en/interfaces/formats#lineasstring

but listed in https://clickhouse.com/docs/en/interfaces/schema-inference#line-as-string

Would assume some inter-linking

@gingerwizard gingerwizard self-assigned this Nov 22, 2024
@gingerwizard
Copy link
Contributor

I think we can link from https://clickhouse.com/docs/en/interfaces/formats to https://clickhouse.com/docs/en/interfaces/schema-inference where appropriate with the comment

"For how this format behaves with schema inference see here)"

I'm not sure we can cleanly link in the other direction @danthegoodman1 hopefully this is sufficient and would have helped in your case.

@danthegoodman1
Copy link
Author

Yeah please link that schema-inference one!

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

No branches or pull requests

2 participants