lib/fluent/plugin/out_bigquery_base.rb in fluent-plugin-bigquery-2.0.0.beta vs lib/fluent/plugin/out_bigquery_base.rb in fluent-plugin-bigquery-2.0.0

- old
+ new

@@ -65,10 +65,11 @@ config_param :request_timeout_sec, :time, default: nil config_param :request_open_timeout_sec, :time, default: 60 ## Partitioning config_param :time_partitioning_type, :enum, list: [:day], default: nil + config_param :time_partitioning_field, :string, default: nil config_param :time_partitioning_expiration, :time, default: nil ## Formatter config_section :format do config_set_default :@type, 'json' @@ -136,10 +137,11 @@ max_bad_records: @max_bad_records, allow_retry_insert_errors: @allow_retry_insert_errors, prevent_duplicate_load: @prevent_duplicate_load, auto_create_table: @auto_create_table, time_partitioning_type: @time_partitioning_type, + time_partitioning_field: time_partitioning_field, time_partitioning_expiration: @time_partitioning_expiration, timeout_sec: @request_timeout_sec, open_timeout_sec: @request_open_timeout_sec, }) end @@ -180,10 +182,10 @@ if schema table_schema = Fluent::BigQuery::RecordSchema.new("record") table_schema.load_schema(schema) @fetched_schemas["#{project}.#{dataset}.#{table_id}"] = table_schema else - if @fetched_schemas["#{project}.#{dataset}.#{table_id}"].empty? + if @fetched_schemas["#{project}.#{dataset}.#{table_id}"].nil? raise "failed to fetch schema from bigquery" else log.warn "#{table_id} uses previous schema" end end