Skip to content

Commit

Permalink
Add more columns
Browse files Browse the repository at this point in the history
  • Loading branch information
karolisg committed Mar 20, 2024
1 parent a7fdf85 commit 6ceca51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dozer-ingestion/aerospike/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ impl Connector for AerospikeConnector {
.iter()
.map(|name| FieldDefinition {
name: name.clone(),
typ: if name == "inserted_at" {
typ: if name == "lut" {
FieldType::Timestamp
} else if name == "PK" {
FieldType::UInt
Expand Down Expand Up @@ -715,7 +715,7 @@ async fn map_record(
}
}

if let Some((index, _)) = columns_map.get("inserted_at") {
if let Some((index, _)) = columns_map.get("lut") {
// Create a NaiveDateTime from the timestamp
let naive = NaiveDateTime::from_timestamp_millis(event.lut as i64)
.ok_or(AerospikeConnectorError::InvalidTimestamp(event.lut as i64))?;
Expand Down
2 changes: 1 addition & 1 deletion dozer-sink-oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl OracleSinkFactory {
}

if !(self.validate_table(connection, table, schema)?) {
let table_query = format!("CREATE TABLE {table} ({})", column_defs.join(",\n"));
let table_query = format!("CREATE TABLE {table} ({}, DST_INSERTED_AT TIMESTAMP DEFAULT CURRENT_TIMESTAMP)", column_defs.join(",\n"));
info!("### CREATE TABLE ####\n{}", table_query);
connection.execute(&table_query, &[])?;
}
Expand Down

0 comments on commit 6ceca51

Please sign in to comment.