You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Function load of Table class does not create table #53
I am trying to import data to keboola from csv with load function in class Table. According to documentation, it should create table, if not exist:
def load(self, table_id, file_path, is_incremental=False, delimiter=',',
enclosure='"', escaped_by='', columns=None,
without_headers=False):
"""
Create a new table from CSV file.
When I trying to import data to non-exists table, I receive an error 404 Client Error: Not Found for url. Is this normal and load function should be only for update existing table ? Now, I have to check if table exist, if not, create it and than load the data. According to me, it should create the table automatically.
Hi,
sorry for late answer. Yes, it is as you say, the function description was indeed incorrect, sorry about that.
The load and create operations are separate because they work with somewhat disjunctive parameters (e.g. create table allows to set primary_key which doesn't make sense for load, and load takes incremental options which do not make sense for create table). Another reason is that the non-existent table might truly signal an error condition (e.g. for incremental loads) so you simply don't want to create it automatically then.
That being said, I understand your issue, and I'd like to improve the usability of the client. So I'm open to more suggestions.
Closing: the docstring this issue points at was already corrected. Tables.load now reads "Load data into an existing table", and Tables.create is the method that creates a new table from a CSV file. As explained above, the two are intentionally separate because they take mostly disjoint parameters (primary key vs. incremental options) and a missing table can be a genuine error for incremental loads.
The README now shows both methods side by side (#96) so the distinction is clear to new users.
Activity
odinuv commentedon Dec 9, 2018
Hi,
sorry for late answer. Yes, it is as you say, the function description was indeed incorrect, sorry about that.
The
loadandcreateoperations are separate because they work with somewhat disjunctive parameters (e.g. create table allows to set primary_key which doesn't make sense for load, and load takes incremental options which do not make sense for create table). Another reason is that the non-existent table might truly signal an error condition (e.g. for incremental loads) so you simply don't want to create it automatically then.That being said, I understand your issue, and I'd like to improve the usability of the client. So I'm open to more suggestions.
jirkasemmler commentedon Sep 29, 2026
Closing: the docstring this issue points at was already corrected.
Tables.loadnow reads "Load data into an existing table", andTables.createis the method that creates a new table from a CSV file. As explained above, the two are intentionally separate because they take mostly disjoint parameters (primary key vs. incremental options) and a missing table can be a genuine error for incremental loads.The README now shows both methods side by side (#96) so the distinction is clear to new users.