$ embulk run -I ~/data/embulk-output-td/lib gcs_td.yml
2017-06-23 18:14:44.697 +0900: Embulk v0.8.25
2017-06-23 18:14:57.034 +0900 [INFO] (0001:transaction): Loaded plugin embulk-input-gcs (0.2.3)
2017-06-23 18:14:57.102 +0900 [INFO] (0001:transaction): Loaded plugin embulk/output/td from a load path
2017-06-23 18:14:59.183 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=8 / output tasks 4 = input tasks 2 * 2
2017-06-23 18:14:59.238 +0900 [INFO] (0001:transaction): td-client version: 0.7.37
2017-06-23 18:14:59.242 +0900 [INFO] (0001:transaction): Reading configuration file: /Users/someone/.td/td.conf
org.embulk.exec.PartialExecutionException: java.lang.NoClassDefFoundError: com/fasterxml/jackson/datatype/jsonorg/JsonOrgModule
at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(org/embulk/exec/BulkLoader.java:375)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.embulk.output.hoge; | |
import okhttp3.mockwebserver.MockWebServer; | |
import org.embulk.spi.OutputPlugin; | |
import org.embulk.test.TestingEmbulk; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Rule; | |
import org.junit.Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Test { | |
public Test(String hoge) { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone [email protected]:treasure-data/embulk-input-marketo.git | |
$ cd embulk-input-marketo | |
$ ./gradlew gem | |
$ cd /path/to/config.yml | |
$ embulk run -I /path/to/embulk-input-marketo/lib config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"kind": "bigquery#table", | |
"etag": "\"ABCDEFGHIJKLMNOPQRSTU\"", | |
"id": "abcdefg:demodatasets.demotable", | |
"selfLink": "https://www.googleapis.com/bigquery/v2/projects/vibrant-grammar-856/datasets/demodatasets/tables/demotable", | |
"tableReference": { | |
"projectId": "abcdefg", | |
"datasetId": "demodatasets", | |
"tableId": "demotable" | |
}, |
https://eventdots.jp/event/618872
- EmbulkでMySQLからBigQueryへ1000個のテーブルをコピーした話 by @kazukgw
- MySQLからBigQueryの同期を差分更新にしたら4倍高速になった話 by 塩﨑健弘
- とあるマーケティング部隊でのembulkの活用事例 by @grimrose
- embulk-input-redashを作ってみた @ariarijp
- Embulkを利用した開発でちょっと困ったこと by @katsuyan121
- Embulk資料集の紹介 @hiroysato
##Example Data
> db.version();
3.0.10
> db.test.find();
{
"_id" : ObjectId("573a9d37efb32df843124db9"),
"account" : 32864,
"time" : ISODate("2015-01-25T13:23:15Z"),
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Schema getFieldSchema() { | |
ImmutableList.Builder<Column> columns = ImmutableList.builder(); | |
columns.add(new Column(0, "record", Types.JSON)); | |
return new Schema(columns.build()); | |
} |
embulk-output-ncmbへのフィードバック
まずgit clone後に./gradlew gem
コマンドでビルドして生成されたgemをembulk runしてもParticalExecutionExceptionが発生して動作しないです。
git cloneしただけの状態でembulk runすると動作するので何かgit add漏れがあると思います。
ちなみに開発中は都度gem installをしなくても以下のコマンドで実行可能です。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = Google::APIClient.new( | |
application_name: "hoge" | |
) | |
storage = client.discovered_api("storage", "v1") | |
scopes = ["https://www.googleapis.com/auth/devstorage.read_write"] | |
auth = Google::Auth::ServiceAccountCredentials.new( | |
json_key_io: StringIO.new(json_keyfile), | |
scope: scopes | |
) | |
auth.fetch_access_token! |
NewerOlder