-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for ~/.datafusionrc
and cli option for overriding it to datafusion-cli
#1875
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
Conversation
I would be interested to hear what @jimexist has to say about it. I am cool with
|
Agree - would like @jimexist opinion. I've renamed to |
i'm thinking of how this can be done in a more generic way. if you think of probably we should read from |
@jimexist i think thats a great idea. the only thing ill add, which i personally would find useful, is the option to provide a custom To give you some context, im expecting to setup different environments and would like to be able to choose which i want to use without having them all bundled. I.e. I could have one for my main job that has ddl for those datasets, and then i could have another focused on arrow dev where i load db-benchmark, parquet-testing, and tpch data, etc. In that case maybe we could have something like no option => startup with |
@jimexist any additional thoughts on the above? If you are ok with it then ill move forward the following: no option => startup with ~/.datafusionrc |
b2ae6b0
to
5597e4c
Compare
@alamb also interested in your thoughts on this as i know you have mentioned using datafusion-cli |
Taking inspiration from https://www.postgresql.org/docs/13/app-psql.html
It appears that mysql has a similar command https://dev.mysql.com/doc/refman/8.0/en/mysql-batch-commands.html Thus I would recommend implementing a |
I thought we were actually already getting inspiriration from psql, see below:
Unless your point is that the above is more for options / configuration than it is for actually SQL / DDL. Which I think makes sense... I can make that update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea of -r <file>
looks good to me
Perhaps we can update the PR title and description to explain what the actual change is now?
Just to ensure were aligned the PR adds both I also think that adding the |
I think it would also be fine to add as a follow on PR. Updating this PR's description and title I think is important though as a way to communicate the change to others |
~/.datafusionrc
and cli option for overriding it to datafusion-cli
Thanks for sticking with this @matthewmturner |
Which issue does this PR close?
Closes #1872
Rationale for this change
What changes are included in this PR?
datafusion-cli will now by default look for
~/.datafusionrc
file and run that before placing user in REPL.User can optionally override the default
.datafusionrc
file using the-r / --rc
option when starting datafusion-cli.Are there any user-facing changes?
Maybe a changed option. If no change to that, then just a new command line option.