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

Dynamic table name assign support #19

Closed
foremap opened this issue Aug 24, 2014 · 3 comments
Closed

Dynamic table name assign support #19

foremap opened this issue Aug 24, 2014 · 3 comments

Comments

@foremap
Copy link

foremap commented Aug 24, 2014

I saw the plugin could support the table name with the time format a few days ago.
But sometimes the time format table name maybe not enough.
Is it possible let plugin read table name by the fields?
For example :
table accesslog_%Y_%m_%{name}

"name" is one of the fileds in fluentd.

@nagachika
Copy link
Contributor

I think assigning a table name by record value has difficulties about validation (field existence, type, contained characters).
How about assign table name by fluent tag? In such a case, fluent-plugin-forest is useful. https://github.com/tagomoris/fluent-plugin-forest

@GLStephen
Copy link
Contributor

GLStephen commented Apr 8, 2017

I know that exploring a data/field driven approach to tables would help many use cases tremendously. It is worth exploring and is not quite the same as what is provided by plugin forest. For instance, in a multi-tenant system data may be ingested with a value indicating the customer. Moving that data into tables specifically for that customer is one way to reduce data usage in BigQuery.

BigQuery also supports creating tables from a schema table. A table that uses the schema of the named table, but is named by the passed in value. This is definitely worth exploring I'm just not yet knowledgeable enough with this plugin to start implementing it.

@joker1007
Copy link
Collaborator

Thank you for comments.
master branch of fluent-plugin-bigquery (released as v0.5.0.beta) has already supported this feature. Because fluentd-0.14.x can use any keys as buffer chunk key, and this plugin supports the feature.
But on fluentd-0.12, it is not easy to support dynamic name assigning.
If this feature is very important, Please use fluentd-0.14.x and v0.5.0.beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants