MCPcopy Create free account
hub / github.com/apache/datafusion / prepare_example_data

Function prepare_example_data

datafusion-examples/examples/data_io/catalog.rs:295–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293}
294
295fn prepare_example_data() -> Result<TempDir> {
296 let dir = tempfile::tempdir()?;
297 let path = dir.path();
298
299 let content = r#"key,value
3001,foo
3012,bar
3023,baz"#;
303
304 for i in 0..5 {
305 let mut file = File::create(path.join(format!("{i}.csv")))?;
306 file.write_all(content.as_bytes())?;
307 }
308
309 Ok(dir)
310}

Callers 1

catalogFunction · 0.85

Calls 4

createFunction · 0.85
pathMethod · 0.45
joinMethod · 0.45
write_allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…