Skip to main content

This is the code I'm trying to execute:

 

celonis = get_celonis()

 

data_pool_name = "dataPool"

data_pool = celonis.data_integration.get_data_pools().find(data_pool_name)

 

column_config =

  ColumnTransport(column_type = ColumnType.STRING, field_length = 10000)

]

 

data_pool_table = data_pool.create_table(df = dfResult, table_name = "tableName", drop_if_exists = True, column_config = column_config)

 

This is the error code:

 

Response: Server error '500 Internal Server Error'

 

The table "tableName" already exists with a defined column named "_COL" inside the DataPool, which has a specific DataModel with just that table. The pandas DataFrame dfResult is a 1x1 table with a string inside.

 

Does that error code mean only the Celonis server is to blame?

Try upsert_table instead of creating, there might be a table with same name already exists in the Data Pool.

 

data_pool.upsert_table(df_or_path=dataframe, table_name=table_name, primary_keys=primary_keys)


Hi @miguel.ferna11 

If you want the output dataframe to be created as a new table, you can try this:

 

data_pool = celonis.data_integration.get_data_pool('DATA POOL ID')

data_pool

data_pool.create_table(df=output_df, table_name="NEW TABLE NAME", drop_if_exists=True)

 


Reply