Maytas Monsereenusorn
03/04/2025, 6:10 PMJohn Kowtko
03/05/2025, 3:52 PMMaytas Monsereenusorn
03/06/2025, 3:59 AMI only use table name aliases in my SQL queries directly. If this is just a naming convention/readability issue, you could always add a CTE at the top of each of your queries to rename tables and columns for easier reference throughout the rest of the query.This won’t work. The goal is that we want to restate (reingest) the whole datasource. This is because some existing value changed. Because Druid will load (segment onto historical) for each time partition (per the segment granularity) independently, our new data will show up at different time. Since the client will continue to make queries to our table, there will be period where data keeps changing (until all new time partitions are loaded). We want to be able to switch to the new ingested data only after all new time partitions are loaded. One idea is to ingest to a new datasource (and hence not overwrite the existing datasource). After the new datasource is ingested and all new time partitions are loaded, we would update the alias to point to the new datasource. The client query will only use the alias (and not the actual datasource names as that will change after each reingestion)
John Kowtko
03/06/2025, 1:22 PMJRob
03/07/2025, 12:42 AMtmp-datasource and ingest the data into it
2. Check that everything looks good in tmp-datasource
3. Create a new datasource named backup-datasource and use a Druid Re-Index task to make a copy of the original datasource
4. Check that everything looks good in backup-datasource
5. Use a Druid Re-Index task to overwrite datasource with tmp-datasource
6. Check that everything looks good in datasource
7. After some period of time drop both tmp-datasource and backup-datasource
If Druid supported a rename feature, this process could be simplified (less error prone and use less disk space):
1. Create new datasource named tmp-datasource and ingest the data into it
2. Check that everything looks good in tmp-datasource
3. Rename datasource to backup-datasource
4. Rename tmp-datasource to datasource
5. After some period of time drop backup-datasourceMaytas Monsereenusorn
03/07/2025, 2:04 AMMaytas Monsereenusorn
03/07/2025, 2:04 AMMaytas Monsereenusorn
03/07/2025, 2:08 AMJohn Kowtko
03/07/2025, 2:56 PMJRob
03/07/2025, 4:34 PMJohn Kowtko
03/07/2025, 5:29 PMMaytas Monsereenusorn
03/07/2025, 5:30 PMJohn Kowtko
03/07/2025, 5:35 PMJRob
03/14/2025, 4:15 AMJRob
03/14/2025, 4:24 AM