Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(bigquery) add configuration "column_name_character_map" to dataset load_job #26255

Open
juseveno opened this issue Jul 1, 2024 · 3 comments · May be fixed by #26252
Open

(bigquery) add configuration "column_name_character_map" to dataset load_job #26255

juseveno opened this issue Jul 1, 2024 · 3 comments · May be fixed by #26252
Assignees
Labels
api: bigquery Issues related to the BigQuery API.

Comments

@juseveno
Copy link
Contributor

juseveno commented Jul 1, 2024

following the merge of a new configuration option in BQ LoadJob, it would be convenient to add the ability to exploit this new configuration in dataset load_job method

@juseveno
Copy link
Contributor Author

juseveno commented Jul 1, 2024

cf. #26252

@dazuma
Copy link
Member

dazuma commented Jul 2, 2024

You can set it in the block passed to load_job:

my_load_job = dataset.load_job "my_new_table", my_file do |schema|
  schema.column_name_character_map = "strict"
end

Adding another argument to load_job makes an already too-long argument list even longer. Is there a reason we need that?

@juseveno
Copy link
Contributor Author

juseveno commented Jul 3, 2024

You're right, passing the configuration to the block actually works.
To my opinion, it's better to have all options available directly through the named params of the method, and have not different behaviors depending on the options but it's totally personal.

@alvarowolfx alvarowolfx added the api: bigquery Issues related to the BigQuery API. label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API.
Projects
None yet
3 participants