MCPcopy Index your code
hub / github.com/simstudioai/sim / buildStatement

Function buildStatement

apps/sim/lib/data-drains/destinations/snowflake.ts:193–198  ·  view source on GitHub ↗
(config: SnowflakeDestinationConfig, rowCount: number)

Source from the content-addressed store, hash-verified

191}
192
193function 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
200function isRetryableStatus(status: number): boolean {
201 return status === 408 || status === 429 || (status >= 500 && status <= 599)

Callers 1

deliverFunction · 0.85

Calls 2

quoteIdentifierFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected