-
Notifications
You must be signed in to change notification settings - Fork 409
refactor(firestore-bigquery-changetracker): improve partitioning code #2445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
const IngestionTimePartitioningSchema = BaseConfigSchema.extend({ | ||
timePartitioning: z.enum(["HOUR", "DAY", "MONTH", "YEAR"]), | ||
timePartitioningColumn: z.undefined(), | ||
timePartitioningFieldType: z.undefined(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change this to timePartitioningColumnType to continue semantic difference between firestore and BQ
We should consistently call BQ fields/columns "columns"
and Firestore fields we will call "fields"
import { z } from "zod"; | ||
|
||
/** | ||
* This is the shared base for all configuration variants. It includes all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a public schema/type for the main exported change tracker class
FieldInternalSchema, | ||
]); | ||
|
||
const InternalPartitioningSchema = z.preprocess((data) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds the partitioningType onto the config...
I dont know whether we actually need the rest of the config, perhaps it's better just to extract a smaller config. Need to check what we actually use here from config
schema?: object | ||
import { BigQuery, TableField } from "@google-cloud/bigquery"; | ||
|
||
const BaseSchema = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be fixed
bcc3fe9
to
06ba7e2
Compare
No description provided.