Export Persons to BigQuery - created_at is INTEGER, should be TIMESTAMP

Open
#29,635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
google-cloud

Research direction

Start with the BigQuery batch-export implementation and the schema mapping for Persons.created_at, using the linked documentation and the Events.created_at mapping as references. Reproduce the export and back-fill, inspect the resulting BigQuery schema, and confirm that Persons.created_at is emitted as TIMESTAMP rather than INTEGER.

Written by the indexing model from the issue text.

Description

bug
Bug Description

Bug description

According to documentation, field Persons.created_at should be a TIMESTAMP. When exported to BigQuery, it appears as an INTEGER field, which is incorrect. By comparison, the Events.created_at field is correct as a TIMESTAMP.
https://posthog.com/docs/cdp/batch-exports/bigquery

See snapshot for BigQuery table schema created by Posthog export.

Image

Steps to reproduce:

  1. Create BQ destination to export the Persons table to BigQuery.
  2. Run back-fill.
  3. Check schema in BigQuery console.
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables or https://eu.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PostHog/posthog

All issues in PostHog/posthog

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.