Skip to content

Conversation

@cosmo0920
Copy link
Contributor

I've written patches to support Windows!

Let's cut out Windows support feature!!!

For PowerShell config is like this:

out:
  type: command
  command: ${input} > task.${Env:INDEX}.${Env:SEQID}.csv
  formatter:
    type: csv

It works as below:

2015-09-11 17:51:20.873 +0900: Embulk v0.7.4
2015-09-11 17:51:23.197 +0900 [INFO] (transaction): Loaded plugin embulk-output-command (0.1.3)
2015-09-11 17:51:23.244 +0900 [INFO] (transaction): Listing local files at directory 'C:\Users\hatake-moz\embulk-output-
command\try1\csv' filtering filename by prefix 'sample_'
2015-09-11 17:51:23.244 +0900 [INFO] (transaction): Loading files [C:\Users\hatake-moz\embulk-output-command\try1\csv\sa
mple_01.csv.gz]
2015-09-11 17:51:23.369 +0900 [INFO] (transaction): {done:  0 / 1, running: 0}
2015-09-11 17:51:23.369 +0900 [INFO] (task-0000): Using command [PowerShell.exe, -Command, ${input} > task.${Env:INDEX}.
${Env:SEQID}.csv]
2015-09-11 17:51:23.790 +0900 [INFO] (transaction): {done:  1 / 1, running: 0}
2015-09-11 17:51:23.837 +0900 [INFO] (main): Committed.
2015-09-11 17:51:23.837 +0900 [INFO] (main): Next config diff: {"in":{"last_path":"C:\\Users\\hatake-moz\\embulk-output-
command\\try1\\csv\\sample_01.csv.gz"},"out":{}} 

PS> Get-Content .\task.0.0.csv
id,account,time,purchase,comment
1,32864,2015-01-27 19:23:49.000000 +0000,2015-01-27 00:00:00.000000 +0000,embulk
2,14824,2015-01-27 19:01:23.000000 +0000,2015-01-27 00:00:00.000000 +0000,embulk jruby
3,27559,2015-01-28 02:20:02.000000 +0000,2015-01-28 00:00:00.000000 +0000,"Embulk ""csv"" parser plugin"
4,11270,2015-01-29 11:54:36.000000 +0000,2015-01-29 00:00:00.000000 +0000,NULL 

@frsyuki
Copy link
Contributor

frsyuki commented Sep 11, 2015

Good job!

@cosmo0920
Copy link
Contributor Author

Any progress?

@hiroyuki-sato
Copy link
Member

It worked well on my windows environment.

https://gist.github.com/hiroyuki-sato/6f629a41fc4e1cc48552

frsyuki added a commit that referenced this pull request Jan 14, 2016
@frsyuki frsyuki merged commit 8f4f05e into embulk:master Jan 14, 2016
@cosmo0920
Copy link
Contributor Author

Thanks!

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