import type { ChangeEvent } from 'react' import type { UseFormReturn } from 'react-hook-form' import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Badge, FormControl, FormField, FormInputGroupInput, InputGroup, InputGroupAddon, InputGroupText, Select, SelectContent, SelectItem, SelectTrigger, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { DestinationType } from '../DestinationPanel.types' import { type DestinationPanelSchemaType } from './DestinationForm.schema' export const AdvancedSettings = ({ type, form, }: { type: DestinationType form: UseFormReturn }) => { const handleNumberChange = (field: { onChange: (value?: number) => void }) => (e: ChangeEvent) => { const val = e.target.value field.onChange(val === '' ? undefined : Number(val)) } return (
Advanced settings Optional performance tuning
{/* Batch wait time - applies to all destinations */} (

Maximum time pipeline waits to collect additional changes before flushing a batch.

Lower values reduce replication latency, higher values improve batching efficiency.

} > milliseconds
)} /> (

Number of tables copied in parallel during the initial snapshot phase.

Each worker uses one replication slot (up to N + 1 total while syncing).

} > workers
)} /> (

Number of parallel connections each table copy can use during initial sync.

More connections speed up large table copies, but use more database connections.

} > connections
)} /> ( )} /> {type === 'BigQuery' && ( <> ( Connection pool size BigQuery only
} layout="horizontal" description={ <>

Size of the BigQuery Storage Write API connection pool.

More connections allow more parallel writes, but consume more resources.

} > connections )} /> ( Maximum staleness BigQuery only } layout="horizontal" description={ <>

Maximum allowed age for BigQuery cached metadata before reading base tables.

Lower values improve freshness, higher values can reduce query cost and latency.

} > minutes
)} /> )} ) }