Skip to content

Commit

Permalink
feat(data-warehouse): basic json support (#17256)
Browse files Browse the repository at this point in the history
* basic support

* fix migrations

* fix migrations

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* edit dependency

* Update UI snapshots for `chromium` (1)

* jsoneachrow

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
EDsCODE and github-actions[bot] authored Sep 11, 2023
1 parent db58c09 commit b2016e4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/scenes/data-warehouse/DataWarehouseTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export function TableForm({ id }: { id: string }): JSX.Element {
options={[
{ label: 'Parquet (recommended)', value: 'Parquet' },
{ label: 'CSV', value: 'CSV' },
{ label: 'JSON', value: 'JSONEachRow' },
]}
/>
</Field>
Expand Down
2 changes: 1 addition & 1 deletion latest_migrations.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name
ee: 0015_add_verified_properties
otp_static: 0002_throttling
otp_totp: 0002_auto_20190420_0723
posthog: 0347_add_bigquery_export_type
posthog: 0348_alter_datawarehousetable_format
sessions: 0001_initial
social_django: 0010_uid_db_index
two_factor: 0007_auto_20201201_1019
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions posthog/migrations/0348_alter_datawarehousetable_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.2.19 on 2023-09-11 15:22

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("posthog", "0347_add_bigquery_export_type"),
]

operations = [
migrations.AlterField(
model_name="datawarehousetable",
name="format",
field=models.CharField(
choices=[("CSV", "CSV"), ("Parquet", "Parquet"), ("JSONEachRow", "JSON")], max_length=128
),
),
]
1 change: 1 addition & 0 deletions posthog/warehouse/models/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class DataWarehouseTable(CreatedMetaFields, UUIDModel, DeletedMetaFields):
class TableFormat(models.TextChoices):
CSV = "CSV", "CSV"
Parquet = "Parquet", "Parquet"
JSON = "JSONEachRow", "JSON"

name: models.CharField = models.CharField(max_length=128)
format: models.CharField = models.CharField(max_length=128, choices=TableFormat.choices)
Expand Down

0 comments on commit b2016e4

Please sign in to comment.