-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Even simpler data upload. #38775
Description
Use case
In the case of HTTP PUT request and POST with form file upload, if the query is not specified, we can assume that it is INSERT into a table with the name as the corresponding file name, with format autodetected from the file name.
If the filename contains extra components, the first component can be interpreted as a database name.
There should be a setting to determine what to do if a table does not exist: - throw an exception (by default); create a table with the default engine, using schema inference from the data; create or replace a table; - or the opposite - throw an exception if table exists.
Additional context
We already allowing to configure custom HTTP API endpoints for INSERTs.
We can also allow to put the database name and table name in the path like this:
http://localhost:8123/db/table
And it makes sense also for the existing API.