JDBC to BIgquery table create

2023-04-23 Thread Himanshu Hazari via user
I am new to Apache beam so please forgive me for the silly question but Is it possible to fetch the data from JDBC and create it in BigQuery. I can see template where data is written to existing BigQuery table. But I want to create table based on the query which I run, no existing table in Bq,

Re: JDBC to BIgquery table create

2023-04-24 Thread XQ Hu via user
Do you mean creating the BigQuery table when it does not exist? If so, you can check https://beam.apache.org/documentation/io/built-in/google-bigquery/#create-disposition . On Mon, Apr 24, 2023 at 12:47 AM Himanshu Hazari via user < user@beam.apache.org> wrote: > I am new to Apache beam so please

Re: JDBC to BIgquery table create

2023-04-24 Thread Ahmed Abualsaud via user
Are you using the JdbcToBigQuery template? That template uses `CREATE_NEVER` so it does not create a BigQuery table. My guess

Re: JDBC to BIgquery table create

2023-04-24 Thread Bruno Volpato via user
Thanks for tagging Ahmed! That's correct, that template isn't prepared to create tables. Creating tables is a bit complicated because you need to be able to infer a schema from the data being read, which may not be easy to generalize for all cases. The template accepts an arbitrary SQL query, and