/exec and Postgres inserts (should?) error already if the table does not exist. ILP will auto create tables, but I think this feature can be disabled so it only writes to tables that exist.
/imp endpoint has no setting to prevent creating a table. You can, however, send a schema alongside the data.
Rather than having to send a schema with each request, it would be useful to force an error using a flag to disable table creation. This means you could create the table once ahead-of-time (as part of provisioning) and enforce that tables are made up-front, without having to send a schema with every request, or check the table exists first.
The use case is for append (i.e batched text submissions), though this could be used for overwrite requests too.
Describe the solution you'd like.
A query parameter:
?&create_table={true/false} (or a better name)
Defaults to true
When false, the import request is rejected with an error indicating that the table does not exist.
Describe alternatives you've considered.
Sending schema with every request (possible, but a bigger change than just adding a bool flag to each request)
Using /exec (not ideal, sending just CSV format is convenient)
Swapping to other inserts (on the todo list)
Is your feature request related to a problem?
/exec and Postgres inserts (should?) error already if the table does not exist. ILP will auto create tables, but I think this feature can be disabled so it only writes to tables that exist.
/imp endpoint has no setting to prevent creating a table. You can, however, send a schema alongside the data.
Rather than having to send a schema with each request, it would be useful to force an error using a flag to disable table creation. This means you could create the table once ahead-of-time (as part of provisioning) and enforce that tables are made up-front, without having to send a schema with every request, or check the table exists first.
The use case is for append (i.e batched text submissions), though this could be used for overwrite requests too.
Describe the solution you'd like.
A query parameter:
?&create_table={true/false} (or a better name) Defaults to true When false, the import request is rejected with an error indicating that the table does not exist.
Describe alternatives you've considered.
Sending schema with every request (possible, but a bigger change than just adding a bool flag to each request) Using /exec (not ideal, sending just CSV format is convenient) Swapping to other inserts (on the todo list)
Full Name:
nwoolmer
Affiliation:
SS
Additional context
No response