BigQuery Sync
Column-level detail for the bigquery_sync_config table
Overview
This domain has a single table, bigquery_sync_config, in the public schema (managed by Prisma).
It stores the settings for pulling customer summary data from Google BigQuery on a cron schedule,
including the service-account credentials, the field mapping, and the result of the last sync run.
Table bigquery_sync_config
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | SERIAL | NO | auto increment | Primary key |
line_oa_id | INTEGER | NO | - | LINE OA this config belongs to |
organization_id | INTEGER | NO | - | Owning organization (tenant separation) |
project_id | VARCHAR(255) | NO | '' | Google Cloud project id holding the BigQuery dataset |
summary_table | VARCHAR(500) | NO | '' | Source BigQuery table read for summary data |
user_id_column | VARCHAR(100) | NO | 'user_id' | BigQuery column used to match a LINE user |
credentials | TEXT | YES | - | Service account credentials (JSON) for BigQuery access |
sync_cron | VARCHAR(100) | NO | '0 6 * * *' | Cron schedule for the sync run (default 06:00 daily) |
field_mappings | JSONB | NO | '[]' | Mapping of BigQuery columns to user attributes |
enabled | BOOLEAN | NO | false | Whether automatic syncing is on |
last_sync_at | TIMESTAMP(3) | YES | - | Timestamp of the last successful sync |
last_sync_result | JSONB | YES | - | Last sync outcome, e.g. row counts or error message |
status | VARCHAR(20) | NO | 'active' | Config record status |
created_by | INTEGER | YES | - | Creator user id |
updated_by | INTEGER | YES | - | Last updater user id |
created_date | TIMESTAMP(3) | YES | now() | Creation timestamp |
updated_date | TIMESTAMP(3) | YES | now() | Last update timestamp |
deleted_date | TIMESTAMP(3) | YES | - | Soft-delete timestamp |
Notes
- Unique:
uq_bigquery_sync_config_org_lineoaon (organization_id,line_oa_id) — one BigQuery sync configuration per LINE OA - Index:
idx_bigquery_sync_config_org_lineoaon (organization_id,line_oa_id) enabledis deliberately separate fromstatus:statusis the lifecycle of the config record, whileenabledis the scheduler switch, so syncing can be paused without deleting the config- The table has no database-level foreign keys —
line_oa_idandorganization_idare logical references toline_oaandorganization