treasure-data / digdag

Workload Automation System
https://www.digdag.io/
Apache License 2.0
1.3k stars 221 forks source link

[Suggestion] digdag init example #255

Closed hiroyuki-sato closed 7 years ago

hiroyuki-sato commented 8 years ago

I understand why this example changed. https://github.com/treasure-data/digdag/commit/8dcbceaa43107377bba5e2740011eef2ff058749

However, It does not work properly if a user does not have TD account.

I think It's better to choose the following ways.

digdag init mydag
2016-09-01 10:48:47 +0900: Digdag v0.8.13
  Creating mydag/.gitignore
  Creating mydag/query.sql
  Creating mydag/mydag.dig
Done. Type `cd mydag` and then `digdag run mydag.dig` to run the workflow. Enjoy!
digdag run mydag.dig
2016-09-01 10:49:02 +0900: Digdag v0.8.13
2016-09-01 10:49:03 +0900 [WARN] (main): Using a new session time 2016-09-01T00:00:00+00:00.
2016-09-01 10:49:03 +0900 [INFO] (main): Using session .digdag/status/20160901T000000+0000.
2016-09-01 10:49:03 +0900 [INFO] (main): Starting a new session project id=1 workflow name=mydag session_time=2016-09-01T00:00:00+00:00
2016-09-01 10:49:04 +0900 [INFO] (0017@+mydag+query): td>: query.sql
2016-09-01 10:49:04 +0900 [INFO] (0017@+mydag+query): td-client version: 0.7.26
2016-09-01 10:49:04 +0900 [ERROR] (0017@+mydag+query): Configuration error at task +mydag+query: Parameter 'apikey' is required but not set (config)
2016-09-01 10:49:04 +0900 [INFO] (0017@+mydag^failure-alert): type: notify
error:
  * +mydag+query:
    Parameter 'apikey' is required but not set

Task state is saved at .digdag/status/20160901T000000+0000 directory.
  * Use --session <daily | hourly | "yyyy-MM-dd[ HH:mm:ss]"> to not reuse the last session time.
  * Use --rerun, --start +NAME, or --goal +NAME argument to rerun skipped tasks.
komamitsu commented 7 years ago

@hiroyuki-sato Thanks for reporting this issue. We added -t option to digdag init command to generate several types of example project (https://github.com/treasure-data/digdag/pull/298)

hiroyuki-sato commented 7 years ago

@komamitsu Thanks!. It seems good examples!.