diff --git a/lib/logstash/outputs/google_bigquery.rb b/lib/logstash/outputs/google_bigquery.rb index cad5de8..b60fed4 100644 --- a/lib/logstash/outputs/google_bigquery.rb +++ b/lib/logstash/outputs/google_bigquery.rb @@ -205,7 +205,11 @@ def get_table_name(time=nil) time ||= Time.now str_time = time.strftime(@date_pattern) - table_id = @table_prefix + @table_separator + str_time + if str_time.to_s.empty? + table_id = @table_prefix + else + table_id = @table_prefix + @table_separator + str_time + end # BQ does not accept anything other than alphanumeric and _ # Ref: https://developers.google.com/bigquery/browser-tool-quickstart?hl=en