First, we will describe our solution to import data to Vertica.We import data to Vertica in "batches". A batch can be of arbitrary size, for example 1 hour of processed logs, 4 hours of processed logs, 1 day of processed logs etc. and the data is inserted into various tables (projections).One batch needs to be either imported or failed. We have non-trivial processing of logs and do this in parallel on several machines - we also import processed logs for each batch to Vertica at the same time from all machines.
Currently our approach is:
1. before the batch import starts, we create new intermediary tables
2. we insert the data to Vertica through multiple JDBC connections
3. after the data from all machines is inserted to Vertica (synchronization point) we make a INSERT INTO real_table SELECT * FROM intermediary_table which effectively copies the data to "real" tables (that are backed by pre-join projections)
4. drop original intermediary tables
(Obviously, point 3. above is made in transaction and either succeeds or fails, so we ensure data integrity.)
The problem with these intermediary tables is that the data needs to be copied two times (first to intermediarytables and then from intermediary tables to real tables), and because of that the inserts are slower than they could be.
Is there some other approach that would allow us to guarantee data integrity, but would be faster?
What is the industry practice to do this?
Thanks,Grega
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.