Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix dozer connectors #2147

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dozer-cli/src/cli/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub async fn list_sources(
) -> Result<(), OrchestrationError> {
let config = init_config(config_paths, config_token, config_overrides, ignore_pipe).await?;
let dozer = init_dozer(runtime, config, Default::default())?;
let connection_map = dozer.list_connectors()?;
let connection_map = dozer.list_connectors().await?;
let mut table_parent = Table::new();
for (connection_name, (tables, schemas)) in connection_map {
let mut first_table_found = false;
Expand Down
18 changes: 8 additions & 10 deletions dozer-cli/src/simple/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,19 +276,17 @@ impl SimpleOrchestrator {
}

#[allow(clippy::type_complexity)]
pub fn list_connectors(
pub async fn list_connectors(
&self,
) -> Result<HashMap<String, (Vec<TableInfo>, Vec<SourceSchema>)>, OrchestrationError> {
self.runtime.block_on(async {
let mut schema_map = HashMap::new();
for connection in &self.config.connections {
let connector = get_connector(connection.clone())?;
let schema_tuples = connector.list_all_schemas().await?;
schema_map.insert(connection.name.clone(), schema_tuples);
}
let mut schema_map = HashMap::new();
for connection in &self.config.connections {
let connector = get_connector(connection.clone())?;
let schema_tuples = connector.list_all_schemas().await?;
schema_map.insert(connection.name.clone(), schema_tuples);
}

Ok(schema_map)
})
Ok(schema_map)
}

pub fn generate_token(&self, ttl_in_secs: Option<i32>) -> Result<String, OrchestrationError> {
Expand Down
3 changes: 0 additions & 3 deletions dozer-sql/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ pub enum PipelineError {
)]
UnsupportedJoinConstraintOperator(String),

#[error("Invalid Field specified in JOIN: {0}")]
InvalidFieldSpecified(String),

#[error("Currently JOIN supports two level of namespacing. For example, `source.field_name` is valid, but `connection.source.field_name` is not.")]
NameSpaceTooLong(String),

Expand Down
Loading