Search code examples
google-cloud-platformgoogle-bigquerygoogle-cloud-logging

Define table destination name with Log Router Sink to BigQuery


I've just created multiple Log Router Sink to send log to BigQuery. I'm using the same dataset. However I'm a bit lost because the tables name in BigQuery corresponding to each sink is not clear. So I'm wondering:

  • How can I find which log route is associated to which BigQuery table?
  • Is there a way to define the destination table name of a Sink?
  • Should I use a different dataset for each sink?
  • How is the name of the table defined?

Solution

  • According to the documentation, the destination table name is based in the log name and looks like you can't change it.

    Log entries are sharded into BigQuery tables whose organization and names are based on the entries' log names and timestamps

    So if you have multiple sinks using the same log name and want to separate the tables, an option could be separate it in multiples datasets.