Skip to content

Commit

Permalink
[components] snapshot import (#28951)
Browse files Browse the repository at this point in the history
parse the component path out of the filenames in ZIP files. use this component path to write documents to tables in different components.

there's a few missing features that i'll get to later:
1. importing single table csv, json, or jsonl has no way to specify component path so it always imports into root component
2. minor race conditions that should be fixed with ComponentRegistry
3. nice error messages if the component path doesn't exist

GitOrigin-RevId: 8efcc413b194eeccea43c56c67afc051dbd9271b
  • Loading branch information
ldanilek authored and Convex, Inc. committed Aug 16, 2024
1 parent a5ee5d0 commit 25598bb
Show file tree
Hide file tree
Showing 4 changed files with 397 additions and 239 deletions.
3 changes: 2 additions & 1 deletion crates/application/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ use common::{
CanonicalizedComponentModulePath,
ComponentDefinitionPath,
ComponentId,
ComponentPath,
PublicFunctionPath,
},
document::{
Expand Down Expand Up @@ -2225,7 +2226,7 @@ impl<RT: Runtime> Application<RT> {
pub async fn clear_tables(
&self,
identity: &Identity,
table_names: Vec<TableName>,
table_names: Vec<(ComponentPath, TableName)>,
) -> anyhow::Result<u64> {
clear_tables(self, identity, table_names).await
}
Expand Down
Loading

0 comments on commit 25598bb

Please sign in to comment.