Python: how to load data into not connected Table/Datamodel

Hello Community,
we are trying to laod some data into a table, which is not connected to a source table in HANA or a CSV-file.
Background is: that we want load some PostgerSQL tables into Celonis, but without connection HANA in between.
the coding is roughly like:
connection = psycopg2.connect(*******)
cursor = connection.cursor()
postgreSQL_select_Query = “select * from cpm_datamodel_load”

all_records = cursor.fetchall()
with CelonisSession(****) as session:

dm = DataModel(348)
df = pd.DataFrame(mobile_records)
dm.push_table(df, “cpm_datamodel_load”)

But what we get is:
CelonisRequestError: 403 Client Error: Forbidden for url: ****/348/cpm_datamodel_load/
Access is denied.

Is this behavior wanted, or do we make any mistake?
Thank you for your support!

Hello Jens,

Welcome to the Celonis Community!

Can you please check the following:

  • Does the user that you use in the python script have edit rights for the datamodel? Edit rights are required to push a table.
  • Is there already a table in the datamodel with the name “cpm_datamodel_load” from another data source? We don’t allow overwriting a table from another datasource (Database, Transport, …) with python. If this is the case, just delete or rename the table in the datamodel and then you should be able to push the new table.