IMSMWU/RClickhouse

Add methods for dbCreateTable and dbAppendTable

Closed this issue · 6 comments

I know it's possible to use dbWriteTable with arguments overwrite or append, but the current DBI documentation suggests using dbCreateTable and dbAppendTable. Having these methods would help me avoid using different code for different DBMSs.

We'll put it on the TODO-List, but feel free to provide a pull request.

Ok, thanks. We'll see if we can make a PR.

We are working on a PR for this functionality, however we don't want this to be implemented in a way that goes against the structure of other code in the repo. Which way would you prefer:

  1. Create dbCreateTable and dbAppendTable methods, where much of dbCreateTable/dbAppendTable gets lifted from the current dbWriteTable, and then revise dbWriteTable to call dbCreateTable or dbAppendTable.
  2. Create dbCreateTable and dbAppendTable methods that just call dbWriteTable with particular values of arguments.

Hi @JSchoenbachler and @jakejh

I think Option 1 might be the better choice. I agree that we should utilise code from dbWriteTable() which already works reliably. Regardless, I am not sure that dbWriteTable should end up calling dbCreateTable or dbAppendTable and instead the three methods should work independently. That way the code might be more maintainable. If you feel differently about it, I would love to hear your ideas.

Yours,
Tridelt

Sounds good, I'm going to work on a dbAppendTable function and a pull request for that. I'll use the same structure as your dbCreateTable function as a model so that it's consistent.

merged! thank you very much for your commits