beam
beam copied to clipboard
[Feature Request]: Add A Freature to get bigquery schema dynamically from a POJO class.
What would you like to happen?
In Bigquery write introduce method "fetchSchemaFromObject" which will dynamically generate schema json from the supplied POJO class. BigQueryIO.<Person>write() .to(tableSpec) .fetchSchemaFromObject(Person.class) ..withFormatFunction( (Person elem) -> new TableRow().set("name", elem.name).set("age", elem.age)) .withCreateDisposition(CreateDisposition.CREATE_IF_NEEDED) .withWriteDisposition(WriteDisposition.WRITE_TRUNCATE));
/** Person.java class **/
class Person {
String name;
int age;
}
/**
Parse Person Object and construct schema json.
**/
fetchSchemaFromObject(Object Person)
Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
Issue Components
- [ ] Component: Python SDK
- [X] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Infrastructure
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner