treasure-data / embulk-input-google_analytics Goto Github PK
View Code? Open in Web Editor NEWEmbulk Input Plugin for Google Analytics
License: MIT License
Embulk Input Plugin for Google Analytics
License: MIT License
Works when installing google-api-client 0.10.3 manually, before embulk-input-google_analytics.
Also embulk-input-google_analytics v0.1.13 isn't available on rubygems.
Hello, developers.
This isn't the issue about embulk-input-google_analytics itself.
But I would like to share the problem.
Embulk users report the issue about embulk-input-google_analytics
and google-output-bigquery
combinations.
It raises the following error.
embulk-input-google_analytics
requires google-api-client 0.10.1
.embulk-output-bigquery
requires google-api-client < 0.33.0
.google-api-client 0.10.1
embulk-api-client 0.10.1
doesn't support location
option. (It introduced around v0.19.6
(maybe))The following change may solve this issue.
It may need to change the version number.
(Embulk google-api-client 0.33.0 requires Ruby 2.4.)
I'm not testing yet.
I'll appreciate it if sometime investigates this issue.
PR #46 may solve this issue.
diff --git a/embulk-input-google_analytics.gemspec b/embulk-input-google_analytics.gemspec
index 57aeb91..503abad 100644
--- a/embulk-input-google_analytics.gemspec
+++ b/embulk-input-google_analytics.gemspec
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.add_dependency "httpclient"
- spec.add_dependency "google-api-client", "0.10.1"
+ spec.add_dependency "google-api-client", [">= 0.10.1", "< 0.33.0"]
# signet version > 11.0 requires Ruby version >= 2.4
# activesupport version > 5.2.3 requires Ruby version >= 2.5
# Current embulk version 0.9.19 runs under jRuby 9.1.x (which is compatible with Ruby 2.3)
Ref: Original report
org.embulk.exec.PartialExecutionException: org.jruby.exceptions.RaiseException: (ArgumentError) unknown keyword: location
at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:340)
at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:566)
at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353)
at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350)
at org.embulk.spi.Exec.doWith(Exec.java:22)
at org.embulk.exec.BulkLoader.run(BulkLoader.java:350)
at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:205)
at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:292)
at org.embulk.EmbulkRunner.run(EmbulkRunner.java:156)
at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:433)
at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:90)
at org.embulk.cli.Main.main(Main.java:64)
Caused by: org.jruby.exceptions.RaiseException: (ArgumentError) unknown keyword: location
at RUBY.get_job(/root/.embulk/lib/gems/gems/google-api-client-0.10.1/generated/google/apis/bigquery_v2/service.rb:321)
at RUBY.block in wait_load(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/bigquery_client.rb:321)
at RUBY.with_network_retry(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/google_client.rb:51)
at RUBY.wait_load(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/bigquery_client.rb:321)
at RUBY.block in load(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/bigquery_client.rb:228)
at RUBY.with_job_retry(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/bigquery_client.rb:58)
at RUBY.load(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/bigquery_client.rb:168)
at RUBY.block in load_in_parallel(/root/.embulk/lib/gems/gems/embulk-output-bigquery-0.6.4/lib/embulk/output/bigquery/bigquery_client.rb:156)
Error: org.jruby.exceptions.RaiseException: (ArgumentError) unknown keyword: location
When I get data of metric whose type is TIME, e.g. sessionDuration, GA API returns double values but this plug-in cast 'timestamp' type
https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=session&jump=ga_sessionduration
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.