Skip to main content

I am trying to do an insert to CARTO table. It is mandatory to not drop the table because it is necessary anytime a table is created to make a specific SQL statement.

This table just has to have the last insert values so a truncate command is required.

I have tried with a SQL Executor with two statements. Truncate and Insert. What SQL Executor does is a truncate for every insert. At the end I have a table with only one row, the last value inserted.

Any ideas?

You can use 2 SQLExecutors, one for one truncate and the other for the inserts. Using a Sampler and a FeatureHolder you should be able to run the truncate statement once and the insert statements after the truncate statement.

 

2021-11-09_15h24_43 

As an alternative you could use an Aggregator to merge all insertrows in one feature, then add a truncaterow above it.


Got it! Thank you!


Reply