MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / copyFromFile

Method copyFromFile

plugins/destination/duckdb/client/write.go:121–125  ·  view source on GitHub ↗
(ctx context.Context, tableName string, fileName string, table *schema.Table)

Source from the content-addressed store, hash-verified

119}
120
121func (c *Client) copyFromFile(ctx context.Context, tableName string, fileName string, table *schema.Table) error {
122 return c.exec(ctx, "copy "+tableName+
123 "("+strings.Join(sanitized(table.Columns.Names()), ", ")+
124 ") from '"+fileName+"' (FORMAT PARQUET)")
125}
126
127func (c *Client) Write(ctx context.Context, msgs <-chan message.WriteMessage) error {
128 if err := c.writer.Write(ctx, msgs); err != nil {

Callers 1

WriteTableBatchMethod · 0.95

Calls 2

execMethod · 0.95
sanitizedFunction · 0.85

Tested by

no test coverage detected