(config: SnowflakeDestinationConfig, rowCount: number)
| 191 | } |
| 192 | |
| 193 | function buildStatement(config: SnowflakeDestinationConfig, rowCount: number): string { |
| 194 | const column = quoteIdentifier(config.column ?? 'DATA') |
| 195 | const target = `${quoteIdentifier(config.database)}.${quoteIdentifier(config.schema)}.${quoteIdentifier(config.table)}` |
| 196 | const placeholders = Array.from({ length: rowCount }, () => '(PARSE_JSON(?))').join(', ') |
| 197 | return `INSERT INTO ${target} (${column}) VALUES ${placeholders}` |
| 198 | } |
| 199 | |
| 200 | function isRetryableStatus(status: number): boolean { |
| 201 | return status === 408 || status === 429 || (status >= 500 && status <= 599) |
no test coverage detected