File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -315,8 +315,12 @@ def store_database(
315315 table_entity = syn .get (database_table_synid )
316316 # upsert table with new and updated rows
317317 if not all_updates .empty :
318- Table (id = database_table_synid ).store_rows (all_updates )
319- logger .info (f"Upserting { len (all_updates )} rows from { table_entity .name } table" )
318+ # TEST convert to csv to enforce float_format="%.12g" in store_rows
319+ with tempfile .TemporaryDirectory () as tmpdir :
320+ tmpfile = os .path .join (tmpdir , "all_updates.csv" )
321+ all_updates .to_csv (tmpfile )
322+ Table (id = database_table_synid ).store_rows (tmpfile )
323+ logger .info (f"Upserting { len (all_updates )} rows from { table_entity .name } table" )
320324 # delete rows from the database
321325 if not to_delete_rows .empty :
322326 Table (id = database_table_synid ).delete_rows (df = to_delete_rows )
You can’t perform that action at this time.
0 commit comments