-
Notifications
You must be signed in to change notification settings - Fork 403
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 Request: Support for Duckdb #730
Comments
Thanks for the feature request. I'm open for a pull request, but I'm not really interested in implementing it by myself. Luckily for you, adding a support for a new dialect to sql-formatter is not that hard. You don't even need to fork sql-formatter to do so, you can just provide it a custom dialect definition. Well, admittedly there's not that much of documentation there, but just copying an existing dialect implementation from sql-formatter source code and modifying it slightly should be pretty simple. You can also look at the wiki, which documents syntax details of all the currently supported SQL dialects. |
Great, I will have a look at it! |
Just for reference: select * from duckdb_keywords();
select * from duckdb_functions(); |
I've set up a PR for this. It's based on the duckdb words: COPY (
SELECT DISTINCT upper(function_name) AS function_name
FROM duckdb_functions()
WHERE function_name SIMILAR TO '^[a-z].*'
ORDER BY function_name
) TO 'duckdb_functions.txt' WITH (sep ',', header FALSE);
COPY (
SELECT upper(keyword_name)
FROM duckdb_keywords()
ORDER BY keyword_name
) TO 'duckdb_keywords.txt' WITH (sep ',', header FALSE);
COPY (
SELECT DISTINCT upper(logical_type)
FROM duckdb_types()
ORDER BY logical_type
) TO 'duckdb_types.txt' WITH (sep ',', header FALSE); I've also leveraged the postgres tests, most are passing. I'm not clear on how to resolve the failing tests - it would be great to get some help. |
duckdb is getting a lot of attention as a fast in-process analytical database. I found out that duckdb is not currently supported. I am currently using
spark
option, but it is not working every time.Are there any plans to add it?
The text was updated successfully, but these errors were encountered: