MCPcopy Create free account
hub / github.com/apache/paimon-rust / create_table

Method create_table

crates/paimon/src/api/rest_api.rs:336–344  ·  view source on GitHub ↗

Create a new table.

(&self, identifier: &Identifier, schema: Schema)

Source from the content-addressed store, hash-verified

334
335 /// Create a new table.
336 pub async fn create_table(&self, identifier: &Identifier, schema: Schema) -> Result<()> {
337 let database = identifier.database();
338 let table = identifier.object();
339 validate_non_empty_multi(&[(database, "database name"), (table, "table name")])?;
340 let path = self.resource_paths.tables(Some(database));
341 let request = CreateTableRequest::new(identifier.clone(), schema);
342 let _resp: serde_json::Value = self.client.post(&path, &request).await?;
343 Ok(())
344 }
345
346 /// Get table information.
347 pub async fn get_table(&self, identifier: &Identifier) -> Result<GetTableResponse> {

Callers 1

mainFunction · 0.45

Calls 5

validate_non_empty_multiFunction · 0.85
objectMethod · 0.80
tablesMethod · 0.80
postMethod · 0.80
databaseMethod · 0.45

Tested by

no test coverage detected