Questions tagged [bindy]

Bindy is a component for Apache-Camel for parsing/binding non-structured data (e.g. CSV records) to/from Java Beans.

Bindy is a component for for parsing/binding non-structured data to/from Java Beans.

It has a support for:

  • CSV records
  • Fixed-length records,
  • FIX messages,
  • or almost any other non-structured data

Bindy evaluates the annotations in the used Java Beans to determine the record structure and to perform the parsing/binding between the data records and the Beans.

99 questions
9
votes
3 answers

java.lang.IllegalArgumentException: Some fields are missing (optional or mandatory)

I am trying to create a fixedfile reader using Apache Camel Bindy but am getting exception.Please help me to find the solution.Without header and footer which is working well. Update: File is small to understand now and public is added File…
sunleo
  • 10,589
  • 35
  • 116
  • 196
4
votes
1 answer

How to parse csv file with camel bindy, when some columns have quotes and some not?

I try to use Camel bindy to process my csv file. Rows of the file look like this: 1111;"2016-06-21";"12:15";"Test1";"1"; 2222;"2016-06-21";"12:16";"Test2";"2"; My model file is: @CsvRecord(separator = ";") public class CsvBean implements…
Peters_
  • 597
  • 2
  • 8
  • 28
4
votes
0 answers

Camel Bindy Model Inheritance

I'm trying to have some inheritance in using bindy csv Dataformat (Camel 2.13.1) I have an abstract class and two concrete classe, each one inherit the base class. ex @CsvRecord(separator=";",generateHeaderColumns=true,skipFirstLine=true) public…
Greg Henry
  • 61
  • 6
3
votes
2 answers

How to set defaultValue parameter in @DataField Camel annotation to empty String instead of null?

I try to unmarshall csv file using apache camel and bindy. I created a model with some fields annotated like this: @DataField(pos = 5, defaultValue = "") The problem is when my csv file contains a column with empty String. Then I got a null value…
Peters_
  • 597
  • 2
  • 8
  • 28
3
votes
3 answers

How to generate a Flat file with header and footer using Camel Bindy

Currently I'm able to generate a flat file from a POJO using camel Bindy but unable to add header and Footer to the complete file. But when I tried to add header/footer to the file, it is adding to each single record but I need to add a single…
Bharath B
  • 76
  • 1
  • 10
3
votes
2 answers

Bindy - Apache Camel. Can a position (column) be ignored while unmarshaling CSV?

I am using camel-bindy to unmarshall a CSV to Java Object. Is it possible to ignore a particular column? Consider following example, I don't want to map column 3 (Address). Please let me know if there is a way to do so. In reality I have more than…
Techie Rabbit
  • 33
  • 1
  • 5
3
votes
1 answer

Multiple data models Apache camel Bindy

I am working with Apache Camel Bindy to process csv files of different data models. e.g. file one is of data model on and file two is of data model two. In the camel route, I associated two calls of the BindyCsvDataFormat with different data models…
Ramya B
  • 31
  • 2
2
votes
0 answers

Can Apache Camel unmarshal CSV records into a POJO using header names?

I found several examples of Apache Camel Bindy unmarshalling CSV records into POJOs using field position: @CsvRecord(separator = ",") public class Person { @DataField(pos = 1) private String name; @DataField(pos = 2) private String…
James
  • 2,876
  • 18
  • 72
  • 116
2
votes
2 answers

Convert csv to xml using bindy

I have csv like this: 31 name 2018-11-01 2018-10-31 12:05:16 3 1 10 1.00 13.00 14 2 20 1.00 14.00 14 3 30 1.00 15.00 14 fields in one line are separated by tab and next I have another lines,…
Shitfy
  • 95
  • 10
2
votes
2 answers

How to force Bindy to always return List?

I have the following route: from("direct:abc") // read the file .split(body().tokenize("\n", 3, false)).streaming().stopOnException() .unmarshal(new BindyCsvDataFormat(Foo.class)) .process(new…
A5300
  • 409
  • 4
  • 18
2
votes
0 answers

Bindy Camel decimal format

I am trying to write decimal pattern for Camel Bindy so it formats decimal number in this way ( it removes ".0" for integer numbers ): 1.1333333 - 1.1333333, 1.0 - 1, -2.0 - -2, For each field I have different precision. I have managed to create…
2
votes
1 answer

How do you marshal with multiple BindyFixedLengthDataFormat models (camel-bindy-2.16)

I am currently trying to upgrade from camel-bindy-2.12.1 to camel-bindy-2.16.2 and am running into a problem when trying to apply a model consisting of multiple classes to a data set resulting in a single text file. I had a number of classes in a…
user1803311
  • 101
  • 8
2
votes
2 answers

Camel CSVRecord Camel Bindy

I'm using camel with bindy (2.16.0) to parse a csv file. The file contains a header and a footer. Both are used as metadata to describe common data for all other records. (Customer defined so I cant change the CSV Format) Im using Bindy to parse…
improvdev
  • 21
  • 3
2
votes
1 answer

Is there a way to automatically detect FIELD / COLUMN order when loading CSV file with headers in first line?

I have CSV files that always contain the same fields, or a subset of the same fields. However they come from different providers, and each provider has a different ordering. Also some providers include the field if it's empty, others remove it.…
Ric Jafe
  • 2,321
  • 2
  • 18
  • 18
1
vote
0 answers

How to apply Bindy Data conversion on Multiple classes/ Apply bindy on factory classes

I have pipe delimited data, which I want to transform that into xml. That transformation needs to be done based on the content of pipe delimited data. I'm trying to apply factory design pattern to design my model classes.It is throwing following…
TechGeek
  • 480
  • 1
  • 8
  • 22
1
2 3 4 5 6 7