Skip to content

Commit

Permalink
Switch to using pipe as delimiter in csv writer for analytics (#13932)
Browse files Browse the repository at this point in the history
## Description 

Some of the fields contain `,` which makes snowflake snowpipe fail
parsing file parsing(rightly so). So switching to a different delimiter
will likely fix the issue here. One such field is:
`"0x2::dynamic_field::Field<u64,
0x3::sui_system_state_inner::SuiSystemStateInnerV2>"`
  • Loading branch information
sadhansood committed Sep 22, 2023
1 parent e70909d commit 64df54b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/sui-analytics-indexer/src/csv_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ impl CSVWriter {
}
let writer = WriterBuilder::new()
.has_headers(false)
.delimiter(b'|')
.from_path(file_path)?;
Ok(writer)
}
Expand Down

1 comment on commit 64df54b

@vercel
Copy link

@vercel vercel bot commented on 64df54b Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.