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

Add template_table config #25

Merged
merged 1 commit into from
Feb 15, 2016
Merged

Conversation

joker1007
Copy link
Contributor

If template_table is set, plugin fetches table schema from it instead of schema_path.

the use case is like templateSuffix.
If base table schema is changed, next created table uses new schema.

And, I refactored some methods for this feature.
How about this?

If template_table is set, plugin fetches table schema from it.
@sakama
Copy link
Contributor

sakama commented Feb 10, 2016

This feature and refactored code looks good to me.
I had wanted to implement like this feature #1.

I'll test at my environment, so please give me a little time.

@frsyuki
Copy link
Contributor

frsyuki commented Feb 10, 2016

@joker1007 @sakama why don't you create BigTable's schema file from Embulk's schema? Output plugins can know schema because input plugin already decided it.

@frsyuki
Copy link
Contributor

frsyuki commented Feb 10, 2016

I mean that template_table seems a good option. Other outputs (such as JDBC) also can have it. But I wonder that's the default.

@joker1007
Copy link
Contributor Author

@frsyuki
If both schema_path and template_table is empty, plugins guess bigquery schema from Input schema. is this right?
It is better. I think so.
If I have time to spare, I want to implement it and submit PR.

@sakama
Copy link
Contributor

sakama commented Feb 10, 2016

@frsyuki @joker1007
Plan had been exists. It requires some works.

  • Need to change plugin type from FileOutputPlugin to OutputPlugin
  • Need to have CSVFormatter/JsonFormatter/GzipFileEncoder at plugin itself.
    • We can use CSVFormatter and GzipEncoder that is implemented at embulk-standards.
    • Current JsonFormatter(embulk-formatter-jsonl) is written by JRuby. Java based JsonFormatter should become faster than them.

@joker1007
Copy link
Contributor Author

Fmm.. it is slightly hard work.

sakama added a commit that referenced this pull request Feb 15, 2016
@sakama sakama merged commit 1380ce1 into embulk:master Feb 15, 2016
@sakama
Copy link
Contributor

sakama commented Feb 15, 2016

I merged. Thanks!

u110 pushed a commit to primenumber-dev/embulk-output-bigquery that referenced this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants