Questions tagged [choetl]

Cinchoo ETL is a popular high-performance ETL framework for .NET.

Cinchoo ETL is an ETL framework for .NET. Simple, intuitive Extract, transform and load (ETL) library for .NET. It is a code-based ETL framework for extracting data from multiple sources, transforming, and loading into your very own data warehouse in .NET environment. Extremely fast, flexible, and easy to use.

Sample shows how to load below CSV (emp.csv) file

Id,Name
1,Tom
2,Carl
3,Mark

Load using iterator

foreach (dynamic e in new ChoCSVReader("Emp.csv").WithFirstLineHeader())
    Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);

Load using loop

var reader = new ChoCSVReader("Emp.csv").WithFirstLineHeader();
dynamic rec;

while ((rec = reader.Read()) != null)
    Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);

Load using POCO object

public class Employee
{
    public int Id { get; set; }
    public string Name { get; set; }
}
foreach (var e in new ChoCSVReader<Employee>("Emp.csv").WithFirstLineHeader())
    Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);

References

57 questions
4
votes
2 answers

Convert CSV (nested objects) to JSON

I need to convert a CSV data (with one line of header, and one line of data) in a JSON object. The CSV contains nested columns, there is an…
Danilo Alonso
  • 41
  • 1
  • 2
2
votes
1 answer

CSV to JSON with dynamic objects name fields

I have a number of CSV files which I desire to translate to JSON files using Cinchoo. I'll need to rename the fields (and convert them into the desired data type). I'm having trouble renaming the fields. Dummy input file: VE NUMMER;VE…
Reinard
  • 3,624
  • 10
  • 43
  • 61
2
votes
2 answers

Merge JSON Array values into a single CSV column

I have a JSON file something like this: { "id": 2, "name": "I.1.A.2", "activeFlag": true, "recipients": [ { "id": 3, "identityName": "idenity1", "fullName":…
MarioP
  • 25
  • 5
2
votes
2 answers

ChoETL nested JSON to CSV

I need to convert a json to csv. The problem is that I can't select everything that i need in the nested json structure. Example of the json file: { "system": { "created": "2021-08-01T13:33:37.123Z", "by": "web" }, …
Cokeisit
  • 23
  • 4
2
votes
1 answer

Cinchoo ETL serialize Class to csv

Trying to serialize class to csv, I am getting: StationId,Data.Datetime_0,Data.Datetime_1 63,2021-05-04T11:00:00+02:00, using the package: public static string StationDetailsCallStringToCSV(StationDetailsCall station) { var csv = new…
Dude
  • 887
  • 6
  • 15
2
votes
1 answer

How I write all values of array using ChoCSVWriter of Cinchoo ETL?

when writing the CSV file it does not have the values red and small Example: imput jsonFile: [ { "id": 1, "name": "Mike", "features": { "colors": [ "blue" ], "sizes": [ "big" ] } }, { …
Fellipe
  • 493
  • 5
  • 7
2
votes
1 answer

How to append to the same csv file with ChoETL?

Currently the code I have below calls JsonToCsv() to parse a JSON file and append to csv accordingly, so the result is as such: result.csv File Name Page Practice Name file1.json 1 Associates & Co However, as you can see i am using a for…
Cataster
  • 3,081
  • 5
  • 32
  • 79
2
votes
3 answers

Convert Nested JSON to CSV in C# via ChoETL

Does anyone know how to convert the below nested JSON to CSV via CHOETL (An ETL framework for .NET)? Thank you! I'm using this code but it will only return the first equipment record. CODE: { using (var json =…
2
votes
1 answer

Convert dynamic csv to json containing List C#

I want to serialize a list of strings in C#? I have previously successfully used an open-source library Cinchoo ETL for similar tasks, but I am stuck in this particular scenario. I do not want to use POCO since my source data structure is dynamic. I…
sonofpaul
  • 25
  • 6
1
vote
1 answer

ChoETL to compare 2 CSV files

I'm trying to compare 2 CSV files and put after if the line is new, changed or deleted. There is a straight forward exemple with the library ChoETL. I'm copying exactly the code from the exemple which is this : static void Main(string[] args) …
Eraaz
  • 19
  • 4
1
vote
1 answer

ParquetWriter not sending all information to blob storage

public async Task UploadParquetFromObjects(string fileName, T objects) { var stringJson = JArray.FromObject(objects).ToString(); var parsedJson = ChoJSONReader.LoadText(stringJson); var desBlob =…
1
vote
1 answer

ChoETL json to csv with multiple arrays

If I have a sample json like this and I want to use choETL to convert json to csv, how do i write both arrays to one file? { "Id": "123456", "Request": [ { "firstName": "A", "lastName": "B", } ], "Response": [ { …
loga0060
  • 81
  • 1
  • 9
1
vote
1 answer

Flatten Json & Ignore array index Using ChoETL

I have 1 json file and these lines of code: Here's my code: using (var r = new ChoJSONReader("data.json") .Configure(c => c.ThrowAndStopOnMissingField = true) .Configure(c =>…
1
vote
1 answer

Using ChoETL to print CSV file returns values to Console as "dynamic"

Hi I am very new to C# and have to turn in a module for integration testing tomorrow. I was trying an easy and expidient way to read CSV files and stumbled on…
dozie419
  • 13
  • 4
1
vote
1 answer

How to use ChoETL to compare two CSV files for ADD, CHANGED or DELETED records (Master vs Detail)?

I've been playing with @Cinchoo's fantastic ETL system for C#. I need to compare two CSV files, where one CSV file is defined as a dynamically growing master table and the other is a feeder "detail" table. The detail table may have differences in…
Fandango68
  • 4,461
  • 4
  • 39
  • 74
1
2 3 4