Skip to main content
I push data in celonis using data push api (python methods), but column width of some of the is so high that it is showing entire content .
is there any way to increase the column with from 80 to 240 in data push api methods

Hi,

 

Yes, you'll have to create column_config with values higher than 80, that should work - pleae note that np.vectorize rounds the number, so maybe you want to add +1 to 'fieldLenght' value or multiply it by 1.2 and round up. If it helps upvote and mark as best answer :)

 

Code snippet:

 

#Creating proper column config based on dataframe called 'df'

measurer = np.vectorize(len)

column_setup_df = pd.Series(df.columns).to_frame("columnName")

column_setup_df_'columnType'] = 'STRING'

column_setup_df_'fieldLenght'] = measurer(df.values.astype(str)).max(axis=0)

column_list = column_setup_df.to_dist('records')

 

#Pushing dataframe 'df' as a table with 'table_name' using created column_config

data_pool.create_table(table_name=table_name, df_or_path=df, if_exists="drop", column_config=column_list)

 

Best Regards,

Mateusz Dudek


Reply