-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(batch-exports): Add backfill workflow (#17909)
- Loading branch information
1 parent
867887e
commit a7ae3b0
Showing
14 changed files
with
955 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
posthog/migrations/0355_add_batch_export_backfill_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Generated by Django 3.2.19 on 2023-10-13 09:13 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
import posthog.models.utils | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("posthog", "0354_organization_never_drop_data"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="batchexportdestination", | ||
name="type", | ||
field=models.CharField( | ||
choices=[ | ||
("S3", "S3"), | ||
("Snowflake", "Snowflake"), | ||
("Postgres", "Postgres"), | ||
("BigQuery", "Bigquery"), | ||
("NoOp", "Noop"), | ||
], | ||
help_text="A choice of supported BatchExportDestination types.", | ||
max_length=64, | ||
), | ||
), | ||
migrations.CreateModel( | ||
name="BatchExportBackfill", | ||
fields=[ | ||
( | ||
"id", | ||
models.UUIDField( | ||
default=posthog.models.utils.UUIDT, editable=False, primary_key=True, serialize=False | ||
), | ||
), | ||
("start_at", models.DateTimeField(help_text="The start of the data interval.")), | ||
("end_at", models.DateTimeField(help_text="The end of the data interval.")), | ||
( | ||
"status", | ||
models.CharField( | ||
choices=[ | ||
("Cancelled", "Cancelled"), | ||
("Completed", "Completed"), | ||
("ContinuedAsNew", "Continuedasnew"), | ||
("Failed", "Failed"), | ||
("Terminated", "Terminated"), | ||
("TimedOut", "Timedout"), | ||
("Running", "Running"), | ||
("Starting", "Starting"), | ||
], | ||
help_text="The status of this backfill.", | ||
max_length=64, | ||
), | ||
), | ||
( | ||
"created_at", | ||
models.DateTimeField( | ||
auto_now_add=True, help_text="The timestamp at which this BatchExportBackfill was created." | ||
), | ||
), | ||
( | ||
"finished_at", | ||
models.DateTimeField( | ||
help_text="The timestamp at which this BatchExportBackfill finished, successfully or not.", | ||
null=True, | ||
), | ||
), | ||
( | ||
"last_updated_at", | ||
models.DateTimeField( | ||
auto_now=True, help_text="The timestamp at which this BatchExportBackfill was last updated." | ||
), | ||
), | ||
( | ||
"batch_export", | ||
models.ForeignKey( | ||
help_text="The BatchExport this backfill belongs to.", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="posthog.batchexport", | ||
), | ||
), | ||
( | ||
"team", | ||
models.ForeignKey( | ||
help_text="The team this belongs to.", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="posthog.team", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.