-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcommand_reference.html
1087 lines (970 loc) · 75.1 KB
/
command_reference.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Command reference — Digdag 0.10.5 documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Language API - Python" href="python_api.html" />
<link rel="prev" title="param_set>: Set a value into a ParamServer as persistent data" href="operators/param_set.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Digdag
</a>
<div class="version">
0.10
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="workflow_definition.html">Workflow definition</a></li>
<li class="toctree-l1"><a class="reference internal" href="scheduling_workflow.html">Scheduling workflow</a></li>
<li class="toctree-l1"><a class="reference internal" href="operators.html">Operators</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Command reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#local-mode-commands">Local-mode commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#init">init</a></li>
<li class="toctree-l3"><a class="reference internal" href="#run">run</a></li>
<li class="toctree-l3"><a class="reference internal" href="#check">check</a></li>
<li class="toctree-l3"><a class="reference internal" href="#scheduler">scheduler</a></li>
<li class="toctree-l3"><a class="reference internal" href="#selfupdate">selfupdate</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#server-mode-commands">Server-mode commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#server">server</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#authenticator-plugins">Authenticator Plugins</a></li>
<li class="toctree-l4"><a class="reference internal" href="#commandexecutor-plugins">CommandExecutor Plugins</a></li>
<li class="toctree-l4"><a class="reference internal" href="#secret-encryption-key">Secret Encryption Key</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#client-mode-commands">Client-mode commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#start">start</a></li>
<li class="toctree-l3"><a class="reference internal" href="#retry">retry</a></li>
<li class="toctree-l3"><a class="reference internal" href="#log">log</a></li>
<li class="toctree-l3"><a class="reference internal" href="#kill">kill</a></li>
<li class="toctree-l3"><a class="reference internal" href="#projects">projects</a></li>
<li class="toctree-l3"><a class="reference internal" href="#workflows">workflows</a></li>
<li class="toctree-l3"><a class="reference internal" href="#schedules">schedules</a></li>
<li class="toctree-l3"><a class="reference internal" href="#disable">disable</a></li>
<li class="toctree-l3"><a class="reference internal" href="#enable">enable</a></li>
<li class="toctree-l3"><a class="reference internal" href="#backfill">backfill</a></li>
<li class="toctree-l3"><a class="reference internal" href="#reschedule">reschedule</a></li>
<li class="toctree-l3"><a class="reference internal" href="#sessions">sessions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#session">session</a></li>
<li class="toctree-l3"><a class="reference internal" href="#attempts">attempts</a></li>
<li class="toctree-l3"><a class="reference internal" href="#attempt">attempt</a></li>
<li class="toctree-l3"><a class="reference internal" href="#tasks">tasks</a></li>
<li class="toctree-l3"><a class="reference internal" href="#push">push</a></li>
<li class="toctree-l3"><a class="reference internal" href="#download">download</a></li>
<li class="toctree-l3"><a class="reference internal" href="#delete">delete</a></li>
<li class="toctree-l3"><a class="reference internal" href="#secrets">secrets</a></li>
<li class="toctree-l3"><a class="reference internal" href="#version">version</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#common-options">Common options</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python_api.html">Language API - Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="ruby_api.html">Language API - Ruby</a></li>
<li class="toctree-l1"><a class="reference internal" href="rest_api.html">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="command_executor.html">Command Executor</a></li>
<li class="toctree-l1"><a class="reference internal" href="internal.html">Internal architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="metrics.html">Digdag metrics (experimental)</a></li>
<li class="toctree-l1"><a class="reference internal" href="community_contributions.html">Community Contributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="logo.html">Logo</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Digdag</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Command reference</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/command_reference.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="command-reference">
<h1>Command reference<a class="headerlink" href="#command-reference" title="Permalink to this headline">¶</a></h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#local-mode-commands" id="id1">Local-mode commands</a></p>
<ul>
<li><p><a class="reference internal" href="#init" id="id2">init</a></p></li>
<li><p><a class="reference internal" href="#run" id="id3">run</a></p></li>
<li><p><a class="reference internal" href="#check" id="id4">check</a></p></li>
<li><p><a class="reference internal" href="#scheduler" id="id5">scheduler</a></p></li>
<li><p><a class="reference internal" href="#selfupdate" id="id6">selfupdate</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#server-mode-commands" id="id7">Server-mode commands</a></p>
<ul>
<li><p><a class="reference internal" href="#server" id="id8">server</a></p>
<ul>
<li><p><a class="reference internal" href="#authenticator-plugins" id="id9">Authenticator Plugins</a></p></li>
<li><p><a class="reference internal" href="#commandexecutor-plugins" id="id10">CommandExecutor Plugins</a></p></li>
<li><p><a class="reference internal" href="#secret-encryption-key" id="id11">Secret Encryption Key</a></p></li>
</ul>
</li>
</ul>
</li>
<li><p><a class="reference internal" href="#client-mode-commands" id="id12">Client-mode commands</a></p>
<ul>
<li><p><a class="reference internal" href="#start" id="id13">start</a></p></li>
<li><p><a class="reference internal" href="#retry" id="id14">retry</a></p></li>
<li><p><a class="reference internal" href="#log" id="id15">log</a></p></li>
<li><p><a class="reference internal" href="#kill" id="id16">kill</a></p></li>
<li><p><a class="reference internal" href="#projects" id="id17">projects</a></p></li>
<li><p><a class="reference internal" href="#workflows" id="id18">workflows</a></p></li>
<li><p><a class="reference internal" href="#schedules" id="id19">schedules</a></p></li>
<li><p><a class="reference internal" href="#disable" id="id20">disable</a></p></li>
<li><p><a class="reference internal" href="#enable" id="id21">enable</a></p></li>
<li><p><a class="reference internal" href="#backfill" id="id22">backfill</a></p></li>
<li><p><a class="reference internal" href="#reschedule" id="id23">reschedule</a></p></li>
<li><p><a class="reference internal" href="#sessions" id="id24">sessions</a></p></li>
<li><p><a class="reference internal" href="#session" id="id25">session</a></p></li>
<li><p><a class="reference internal" href="#attempts" id="id26">attempts</a></p></li>
<li><p><a class="reference internal" href="#attempt" id="id27">attempt</a></p></li>
<li><p><a class="reference internal" href="#tasks" id="id28">tasks</a></p></li>
<li><p><a class="reference internal" href="#push" id="id29">push</a></p></li>
<li><p><a class="reference internal" href="#download" id="id30">download</a></p></li>
<li><p><a class="reference internal" href="#delete" id="id31">delete</a></p></li>
<li><p><a class="reference internal" href="#secrets" id="id32">secrets</a></p></li>
<li><p><a class="reference internal" href="#version" id="id33">version</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#common-options" id="id34">Common options</a></p></li>
</ul>
</div>
<div class="section" id="local-mode-commands">
<h2><a class="toc-backref" href="#id1">Local-mode commands</a><a class="headerlink" href="#local-mode-commands" title="Permalink to this headline">¶</a></h2>
<div class="section" id="init">
<h3><a class="toc-backref" href="#id2">init</a><a class="headerlink" href="#init" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag init <dir>
</pre></div>
</div>
<p>Creates a new workflow project. This command generates a sample .dig file, scripts used in the workflow, and .gitignore file in <strong><dir></strong> directory. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag init mydag
</pre></div>
</div>
<p>Options:</p>
<dl>
<dt><strong class="command">-t, --type EXAMPLE_TYPE</strong></dt><dd><p>Use specified example project type (default: echo).</p>
<p>Available types are <cite>echo</cite>, <cite>sh</cite>, <cite>ruby</cite>, <cite>python</cite>, <cite>td</cite> or <cite>postgresql</cite>.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-t</span> <span class="pre">sh</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="run">
<h3><a class="toc-backref" href="#id3">run</a><a class="headerlink" href="#run" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag run <workflow.dig> <span class="o">[</span>+task<span class="o">]</span> <span class="o">[</span>options...<span class="o">]</span>
</pre></div>
</div>
<p>Runs workflow.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag run workflow.dig
<span class="gp">$</span> digdag run workflow.dig +step2
<span class="gp">$</span> digdag run another.dig --start +step2
<span class="gp">$</span> digdag run another.dig --start +step2 --end +step4
<span class="gp">$</span> digdag run another.dig -g +step1 --hour
<span class="gp">$</span> digdag run workflow.dig -p <span class="nv">environment</span><span class="o">=</span>staging -p <span class="nv">user</span><span class="o">=</span>frsyuki
<span class="gp">$</span> digdag run workflow.dig --session hourly
</pre></div>
</div>
<p>Options:</p>
<dl>
<dt><strong class="command">--project DIR</strong></dt><dd><p>Use this directory as the project directory (default: current directory).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--project</span> <span class="pre">workflow/</span></code></p>
</dd>
<dt><strong class="command">-o, --save DIR</strong></dt><dd><p>Use this directory to read and write session status (default: .digdag/status).</p>
<p>Digdag creates a file in this directory when a task successfully finishes. When digdag runs again, it skips tasks if this a file exists in this directory. This is useful to resume a failed workflow from the middle.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-o</span> <span class="pre">.digdag/status</span></code></p>
</dd>
<dt><strong class="command">-a, --rerun</strong></dt><dd><p>Rerun all tasks even if the tasks successfully finished before. In other words, ignore files at <code class="docutils literal notranslate"><span class="pre">-o,</span> <span class="pre">--save</span></code> directory.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--rerun</span></code></p>
</dd>
<dt><strong class="command">-s, --start +NAME</strong></dt><dd><p>If this option is set, Digdag runs this task and following tasks even if the tasks successfully finished before. The other tasks will be skipped if their state files are stored at <code class="docutils literal notranslate"><span class="pre">-o,</span> <span class="pre">--save</span></code> directory.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--start</span> <span class="pre">+step2</span></code></p>
</dd>
<dt><strong class="command">-g, --goal +NAME</strong></dt><dd><p>If this option is set, Digdag runs this task and its children tasks even if the tasks successfully finished before. The other tasks will be skipped if their state files are stored at <code class="docutils literal notranslate"><span class="pre">-o,</span> <span class="pre">--save</span></code> directory.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--goal</span> <span class="pre">+step2</span></code></p>
</dd>
<dt><strong class="command">-e, --end +NAME</strong></dt><dd><p>Stops workflow right before this task. This task and following tasks will be skipped.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--end</span> <span class="pre">+step4</span></code></p>
</dd>
<dt><strong class="command">--session EXPR</strong></dt><dd><p>Set session_time to this time. Argument is either of:</p>
<blockquote>
<div><ul class="simple">
<li><p>daily: uses today’s 00:00:00 as the session time (update session time every day).</p></li>
<li><p>hourly: uses current hour’s 00:00 as the session time (update session time every hour).</p></li>
<li><p>schedule: calculates time based on <code class="docutils literal notranslate"><span class="pre">schedule</span></code> configuration of the workflow. Error if <code class="docutils literal notranslate"><span class="pre">schedule</span></code> is not set.</p></li>
<li><p>last: reuses the last session time of the last execution. If it’s not available, tries to calculate based on <code class="docutils literal notranslate"><span class="pre">schedule</span></code>, or uses today’s 00:00:00.</p></li>
<li><p>timestamp in <em>yyyy-MM-dd</em> or <em>yyyy-MM-dd HH:mm:ss</em> format: uses the specified time as the session time.</p></li>
</ul>
</div></blockquote>
<p>Default is “last”.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--session</span> <span class="pre">2016-01-01</span></code></p>
</dd>
<dt><strong class="command">--no-save</strong></dt><dd><p>Disables session state files completely.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--no-save</span></code></p>
</dd>
<dt><strong class="command">--max-task-threads N</strong></dt><dd><p>Limit maximum number of task execution threads.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--max-task-threads</span> <span class="pre">5</span></code></p>
</dd>
<dt><strong class="command">-O, --task-log DIR</strong></dt><dd><p>Store task logs to this directory.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--task-log</span> <span class="pre">log/tasks</span></code></p>
</dd>
<dt><strong class="command">-p, --param KEY=VALUE</strong></dt><dd><p>Add a session parameter (use multiple times to set many parameters) in KEY=VALUE syntax. This parameter is available using <code class="docutils literal notranslate"><span class="pre">${...}</span></code> syntax in the YAML file, or using language API.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">environment=staging</span></code></p>
<p>Note: Variable defined in _export is not overwritable by –param option.</p>
</dd>
<dt><strong class="command">-P, --params-file PATH</strong></dt><dd><p>Read parameters from a YAML/JSON file. Nested parameter (like {mysql: {user: me}}) are accessible using “.” syntax (like ${mysql.user}).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-P</span> <span class="pre">params.yml</span></code></p>
</dd>
<dt><strong class="command">-d, --dry-run</strong></dt><dd><p>Dry-run mode. This mode doesn’t run tasks.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-d</span></code></p>
</dd>
<dt><strong class="command">-E, --show-params</strong></dt><dd><p>Show calculated parameters given to a task before running the task. Useful to use with dry-run mode.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-dE</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="check">
<h3><a class="toc-backref" href="#id4">check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag check <span class="o">[</span>workflow.dig<span class="o">]</span> <span class="o">[</span>options...<span class="o">]</span>
</pre></div>
</div>
<p>Shows workflow definitions and schedules. “c” is alias of check command. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag c
<span class="gp">$</span> digdag check
<span class="gp">$</span> digdag check another.dig
</pre></div>
</div>
<dl>
<dt><strong class="command">--project DIR</strong></dt><dd><p>Use this directory as the project directory (default: current directory).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--project</span> <span class="pre">workflow/</span></code></p>
</dd>
<dt><strong class="command">-p, --param KEY=VALUE</strong></dt><dd><p>Overwrite a parameter (use multiple times to set many parameters) in KEY=VALUE syntax. This parameter is available using <code class="docutils literal notranslate"><span class="pre">${...}</span></code> syntax in the YAML file, or using language API.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">environment=staging</span></code></p>
<p>Note: Variable defined in _export is not overwritable by –param option.</p>
</dd>
<dt><strong class="command">-P, --params-file PATH</strong></dt><dd><p>Read parameters from a YAML file. Nested parameter (like {mysql: {user: me}}) are accessible using “.” syntax (like ${mysql.user}).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-P</span> <span class="pre">params.yml</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="scheduler">
<h3><a class="toc-backref" href="#id5">scheduler</a><a class="headerlink" href="#scheduler" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag scheduler <span class="o">[</span>options...<span class="o">]</span>
</pre></div>
</div>
<p>Runs a workflow scheduler that runs schedules periodically. This picks up all workflow definition files named with <code class="docutils literal notranslate"><span class="pre">.dig</span></code> suffix at the current directory. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag scheduler
<span class="gp">$</span> digdag scheduler -d status
<span class="gp">$</span> digdag scheduler -b <span class="m">0</span>.0.0.0
</pre></div>
</div>
<dl>
<dt><strong class="command">--project DIR</strong></dt><dd><p>Use this directory as the project directory (default: current directory).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--project</span> <span class="pre">workflow/</span></code></p>
</dd>
<dt><strong class="command">-n, --port PORT</strong></dt><dd><p>Port number to listen for web interface and api clients (default: 65432).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">8080</span></code></p>
</dd>
<dt><strong class="command">-b, --bind ADDRESS</strong></dt><dd><p>IP address to listen HTTP clients (default: 127.0.0.1).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-b</span> <span class="pre">0.0.0.0</span></code></p>
</dd>
<dt><strong class="command">-o, --database DIR</strong></dt><dd><p>Store status to this database. Default is memory that doesn’t save status.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--database</span> <span class="pre">digdag</span></code></p>
</dd>
<dt><strong class="command">-O, --task-log DIR</strong></dt><dd><p>Store task logs to this directory. If this option is not set, <code class="docutils literal notranslate"><span class="pre">digdag</span> <span class="pre">log</span></code> command doesn’t work.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--task-log</span> <span class="pre">digdag.log</span></code></p>
</dd>
<dt><strong class="command">--max-task-threads N</strong></dt><dd><p>Limit maximum number of task execution threads on this server.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--max-task-threads</span> <span class="pre">5</span></code></p>
</dd>
<dt><strong class="command">-p, --param KEY=VALUE</strong></dt><dd><p>Add a session parameter (use multiple times to set many parameters) in KEY=VALUE syntax. This parameter is available using <code class="docutils literal notranslate"><span class="pre">${...}</span></code> syntax in the YAML file, or using language API.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">environment=staging</span></code></p>
<p>Note: Variable defined in _export is not overwritable by –param option.</p>
</dd>
<dt><strong class="command">-P, --params-file PATH</strong></dt><dd><p>Read parameters from a YAML file. Nested parameter (like {mysql: {user: me}}) are accessible using “.” syntax (like ${mysql.user}).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-P</span> <span class="pre">params.yml</span></code></p>
</dd>
<dt><strong class="command">-c, --config PATH</strong></dt><dd><p>Configuration file to load. (default: ~/.config/digdag/config)</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-c</span> <span class="pre">digdag-server/server.properties</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="selfupdate">
<h3><a class="toc-backref" href="#id6">selfupdate</a><a class="headerlink" href="#selfupdate" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag selfupdate <span class="o">[</span>version<span class="o">]</span>
</pre></div>
</div>
<p>Updates the executable binary file to the latest version or specified version. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag selfupdate
<span class="gp">$</span> digdag selfupdate <span class="m">0</span>.10.5
</pre></div>
</div>
</div>
</div>
<div class="section" id="server-mode-commands">
<h2><a class="toc-backref" href="#id7">Server-mode commands</a><a class="headerlink" href="#server-mode-commands" title="Permalink to this headline">¶</a></h2>
<div class="section" id="server">
<h3><a class="toc-backref" href="#id8">server</a><a class="headerlink" href="#server" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag server <span class="o">[</span>options...<span class="o">]</span>
</pre></div>
</div>
<p>Runs a digdag server. –memory or –database option is required. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag server --memory
<span class="gp">$</span> digdag server -o digdag-server
<span class="gp">$</span> digdag server -o digdag-server -b <span class="m">0</span>.0.0.0
</pre></div>
</div>
<dl>
<dt><strong class="command">-n, --port PORT</strong></dt><dd><p>Port number to listen for web interface and api clients (default: 65432).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-n</span> <span class="pre">8080</span></code></p>
</dd>
<dt><strong class="command">-b, --bind ADDRESS</strong></dt><dd><p>IP address to listen HTTP clients (default: 127.0.0.1).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-b</span> <span class="pre">0.0.0.0</span></code></p>
</dd>
<dt><strong class="command">-o, --database DIR</strong></dt><dd><p>Store status to this database.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--database</span> <span class="pre">digdag</span></code></p>
</dd>
<dt><strong class="command">-m, --memory</strong></dt><dd><p>Store status in memory. Data will be removed when the server exits.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--memory</span></code></p>
</dd>
<dt><strong class="command">-O, --task-log DIR</strong></dt><dd><p>Store task logs to this directory. If this option is not set, <code class="docutils literal notranslate"><span class="pre">digdag</span> <span class="pre">log</span></code> command doesn’t work.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--task-log</span> <span class="pre">digdag/sessions</span></code></p>
</dd>
<dt><strong class="command">-A, --access-log DIR</strong></dt><dd><p>Store access logs to this directory.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--access-log</span> <span class="pre">digdag/log</span></code></p>
</dd>
<dt><strong class="command">--disable-local-agent</strong></dt><dd><p>Disable task execution on this server.</p>
<p>This option is useful when there’re multiple servers sharing the same underlay database and some of the servers are prepared only for REST API. See also <code class="docutils literal notranslate"><span class="pre">--disable-executor-loop</span></code> option.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--disable-local-agent</span></code></p>
</dd>
<dt><strong class="command">--max-task-threads N</strong></dt><dd><p>Limit maximum number of task execution threads on this server.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--max-task-threads</span> <span class="pre">5</span></code></p>
</dd>
<dt><strong class="command">--disable-executor-loop</strong></dt><dd><p>Disable workflow executor on this server. Workflow executor loop updates state of tasks on the underlay database. At least one server that is sharing the same underlay database must enable workflow executor loop.</p>
<p>This option is useful when there’re multiple servers sharing the same underlay database and some of the servers are prepared only for task execution or REST API. See also <code class="docutils literal notranslate"><span class="pre">--disable-local-agent</span></code> option.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--disable-executor-loop</span></code></p>
</dd>
<dt><strong class="command">--disable-scheduler</strong></dt><dd><p>Disable a schedule executor on this server.</p>
<p>This option is useful when you want to disable all schedules without modifying workflow files. See also <code class="docutils literal notranslate"><span class="pre">--disable-executor-loop</span></code> option.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--disable-scheduler</span></code></p>
</dd>
<dt><strong class="command">-p, --param KEY=VALUE</strong></dt><dd><p>Add a session parameter (use multiple times to set many parameters) in KEY=VALUE syntax. This parameter is available using <code class="docutils literal notranslate"><span class="pre">${...}</span></code> syntax in the YAML file, or using language API.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">environment=staging</span></code></p>
<p>Note: Variable defined in _export is not overwritable by –param option.</p>
</dd>
<dt><strong class="command">-P, --params-file PATH</strong></dt><dd><p>Read parameters from a YAML file. Nested parameter (like {mysql: {user: me}}) are accessible using “.” syntax (like ${mysql.user}).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-P</span> <span class="pre">params.yml</span></code></p>
</dd>
<dt><strong class="command">-c, --config PATH</strong></dt><dd><p>Configuration file to load. (default: ~/.config/digdag/config) See the followings for details.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-c</span> <span class="pre">digdag-server/server.properties</span></code></p>
</dd>
</dl>
<p>In the config file, following parameters are available</p>
<ul class="simple">
<li><p>server.bind (ip address)</p></li>
<li><p>server.port (integer)</p></li>
<li><p>server.admin.bind (ip address)</p></li>
<li><p>server.admin.port (integer)</p></li>
<li><p>server.access-log.path (string. same with –access-log)</p></li>
<li><p>server.access-log.pattern (string, “json”, “combined” or “common”)</p></li>
<li><p>server.http.io-threads (number of HTTP IO threads in integer. default: available CPU cores or 2, whichever is greater)</p></li>
<li><p>server.http.worker-threads (number of HTTP worker threads in integer. default: server.http.io-threads * 8)</p></li>
<li><p>server.http.no-request-timeout (maximum allowed time for clients to keep a connection open without sending requests or receiving responses in seconds. default: 60)</p></li>
<li><p>server.http.request-parse-timeout (maximum allowed time of reading a HTTP request in seconds. this doesn’t affect on reading request body. default: 30)</p></li>
<li><p>server.http.io-idle-timeout (maximum allowed idle time of reading HTTP request and writing HTTP response in seconds. default: 300)</p></li>
<li><p>server.http.enable-http2 (enable HTTP/2. default: false)</p></li>
<li><p>server.http.headers.KEY = VALUE (HTTP header to set on API responses)</p></li>
<li><p>server.jmx.port (port to listen JMX in integer. default: JMX is disabled) Since Java 9, to use this option, you need to set ‘-Djdk.attach.allowAttachSelf=true’ to command line option of java or to JDK_JAVA_OPTIONS environment variable.</p></li>
<li><p>server.authenticator.type (string) The name an authenticator plugin. (See also Authenticator Plugins section bellow): <code class="docutils literal notranslate"><span class="pre">basic</span></code></p></li>
<li><p>database.type (enum, “h2” or “postgresql”)</p></li>
<li><p>database.user (string)</p></li>
<li><p>database.password (string)</p></li>
<li><p>database.host (string)</p></li>
<li><p>database.port (integer)</p></li>
<li><p>database.database (string)</p></li>
<li><p>database.loginTimeout (seconds in integer, default: 30)</p></li>
<li><p>database.socketTimeout (seconds in integer, default: 1800)</p></li>
<li><p>database.ssl (boolean, default: false)</p></li>
<li><p>database.sslfactory (string, default: “org.postgresql.ssl.NonValidatingFactory”, “org.postgresql.ssl.LibPQFactory” is also available)</p></li>
<li><p>database.sslmode (string, “disable”, “allow”, “prefer”, “require”, “verify-ca” or “verify-full”. enable if sslfactory is set to “org.postgresql.ssl.LibPQFactory”)</p></li>
<li><p>database.sslcert (path to ssl cert file in string. enable if sslfactory is set to “org.postgresql.ssl.LibPQFactory”)</p></li>
<li><p>database.sslkey (path to ssl key file in string. enable if sslfactory is set to “org.postgresql.ssl.LibPQFactory”)</p></li>
<li><p>database.sslrootcert (path to ssl root cert file. enable if sslfactory is set to “org.postgresql.ssl.LibPQFactory”)</p></li>
<li><p>database.connectionTimeout (seconds in integer, default: 30)</p></li>
<li><p>database.idleTimeout (seconds in integer, default: 600)</p></li>
<li><p>database.keepaliveTime (seconds in integer, default: 0)</p></li>
<li><p>database.validationTimeout (seconds in integer, default: 5)</p></li>
<li><p>database.maximumPoolSize (integer, default: available CPU cores * 32)</p></li>
<li><p>database.minimumPoolSize (integer, default: same as database.maximumPoolSize)</p></li>
<li><p>database.leakDetectionThreshold (HikariCP leakDetectionThreshold milliseconds in integer. default: 0. To enable, set to >= 2000.)</p></li>
<li><p>database.migrate (enable DB migration. default: true)</p></li>
<li><p>archive.type (type of project archiving, “db”, “s3” or “gcs”. default: “db”)</p></li>
<li><p>archive.s3.endpoint (string. default: “s3.amazonaws.com”)</p></li>
<li><p>archive.s3.bucket (string)</p></li>
<li><p>archive.s3.path (string)</p></li>
<li><p>archive.s3.credentials.access-key-id (string. default: instance profile)</p></li>
<li><p>archive.s3.credentials.secret-access-key (string. default: instance profile)</p></li>
<li><p>archive.s3.path-style-access (boolean. default: false)</p></li>
<li><p>archive.gcs.bucket (string)</p></li>
<li><p>archive.gcs.credentials.json.path (string. if not set, auth with local authentication information. Also if path and content are set, path has priority.)</p></li>
<li><p>archive.gcs.credentials.json.content (string. if not set, auth with local authentication information. Also if path and content are set, path has priority.)</p></li>
<li><p>log-server.type (type of log storage, “local” , “null”, “s3” or “gcs”. default: “null”. This parameter will be overwritten with “local” if <code class="docutils literal notranslate"><span class="pre">-O,</span> <span class="pre">--task-log</span> <span class="pre">DIR</span></code> is set.)</p></li>
<li><p>log-server.s3.endpoint (string, default: “s3.amazonaws.com”)</p></li>
<li><p>log-server.s3.bucket (string)</p></li>
<li><p>log-server.s3.path (string)</p></li>
<li><p>log-server.s3.direct_download (boolean. default: false)</p></li>
<li><p>log-server.s3.credentials.access-key-id (string. default: instance profile)</p></li>
<li><p>log-server.s3.credentials.secret-access-key (string. default: instance profile)</p></li>
<li><p>log-server.s3.path-style-access (boolean. default: false)</p></li>
<li><p>log-server.gcs.bucket (string)</p></li>
<li><p>log-server.gcs.credentials.json.path (string. if not set, auth with local authentication information. Also if path and content are set, path has priority.)</p></li>
<li><p>log-server.gcs.credentials.json.content (string. if not set, auth with local authentication information. Also if path and content are set, path has priority.)</p></li>
<li><p>log-server.local.path (string. default: digdag.log)</p></li>
<li><p>log-server.local.split_size (long. max log file size in bytes(uncompressed). default: 0 (not splitted))</p></li>
<li><p>digdag.secret-encryption-key = (base64 encoded 128-bit AES encryption key)</p></li>
<li><p>executor.task_ttl (string. default: 1d. A task is killed if it is running longer than this period.)</p></li>
<li><p>executor.task_max_run (integer. default: 1000. Max number of tasks in workflow.)</p></li>
<li><p>executor.attempt_ttl (string. default: 7d. An attempt is killed if it is running longer than this period.)</p></li>
<li><p>executor.attempt_max_run (integer. default: 100. Max number of running attempts at once per each site_id.)</p></li>
<li><p>executor.enqueue_random_fetch (enqueue ready tasks randomly. default: false)</p></li>
<li><p>executor.enqueue_fetch_size ( Number of tasks to be enqueued. default: 100)</p></li>
<li><p>api.max_attempts_page_size (integer. The max number of rows of attempts in api response)</p></li>
<li><p>api.max_sessions_page_size (integer. The max number of rows of sessions in api response)</p></li>
<li><p>api.max_archive_total_size_limit (integer. The maximum size of an archived project. i.e. <code class="docutils literal notranslate"><span class="pre">digdag</span> <span class="pre">push</span></code> size. default: 2MB(2*1024*1024))</p></li>
<li><p>eval.js-engine-type (type of ConfigEvalEngine. “nashorn” or “graal”. “nashorn” is default on Java8 and “graal” is default on Java11)</p></li>
<li><p>eval.extended-syntax (boolean, default: true. Enable or disable extended syntax in graal. If true, nested <code class="docutils literal notranslate"><span class="pre">{..}</span></code> is allowed)</p></li>
<li><p>agent.max-task-threads (integer. The maximum number of task execution threads)</p></li>
<li><p>agent.command_executor.type (type of command executor, “ecs”, “docker”, “simple” or “kubernetes”. See also CommandExecutor Plugins section bellow. default: “ecs”)</p></li>
</ul>
<div class="section" id="authenticator-plugins">
<h4><a class="toc-backref" href="#id9">Authenticator Plugins</a><a class="headerlink" href="#authenticator-plugins" title="Permalink to this headline">¶</a></h4>
<p>Authenticator implementation is to be provided by a system plugin (See <cite>System plugins section in Internal architecture <internal.html#system-plugins></cite>). Interface is <code class="docutils literal notranslate"><span class="pre">io.digdag.spi.AuthenticatorFactory</span></code>.</p>
<p><strong>Basic Auth</strong></p>
<p>Enabled by default (<code class="docutils literal notranslate"><span class="pre">server.authenticator.type</span> <span class="pre">=</span> <span class="pre">basic</span></code>).</p>
<p>Configuration:</p>
<ul class="simple">
<li><p>server.authenticator.basic.username (string, if not set, no authentications happen)</p></li>
<li><p>server.authenticator.basic.password (string. Required if username is set)</p></li>
<li><p>server.authenticator.basic.admin (boolean. default <cite>false</cite>)</p></li>
</ul>
</div>
<div class="section" id="commandexecutor-plugins">
<h4><a class="toc-backref" href="#id10">CommandExecutor Plugins</a><a class="headerlink" href="#commandexecutor-plugins" title="Permalink to this headline">¶</a></h4>
<p>CommandExecutor implementation is to be provided by a system plugin (See <cite>System plugins section in Internal architecture <internal.html#system-plugins></cite>). Interface is <code class="docutils literal notranslate"><span class="pre">io.digdag.spi.CommandExecutorFactory</span></code>.</p>
<p>You can specify the command executor to use by <cite>agent.command_executor.type</cite>. (digdag version v0.10.4 and up)</p>
<p>The following executors can be set by default.</p>
<ul class="simple">
<li><p>ecs (default)</p></li>
<li><p>docker</p></li>
<li><p>simple</p></li>
<li><p>kubernetes (EXPERIMENTAL)</p></li>
</ul>
<p>See also [Command Executor](command_executor.html) for details.</p>
</div>
<div class="section" id="secret-encryption-key">
<h4><a class="toc-backref" href="#id11">Secret Encryption Key</a><a class="headerlink" href="#secret-encryption-key" title="Permalink to this headline">¶</a></h4>
<p>The secret encryption key is used to encrypt secrets when they are stored in the digdag server database. It must be a valid 128-bit AES key, base64 encoded.</p>
<p>Example:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>digdag.secret-encryption-key = MDEyMzQ1Njc4OTAxMjM0NQ==
# example
echo -n '16_bytes_phrase!' | openssl base64
MTZfYnl0ZXNfcGhyYXNlIQ==
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="client-mode-commands">
<h2><a class="toc-backref" href="#id12">Client-mode commands</a><a class="headerlink" href="#client-mode-commands" title="Permalink to this headline">¶</a></h2>
<p>Client-mode common options:</p>
<dl>
<dt><strong class="command">-e, --endpoint HOST</strong></dt><dd><p>HTTP endpoint of the server (default: <a class="reference external" href="http://127.0.0.1:65432">http://127.0.0.1:65432</a>)</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--endpoint</span> <span class="pre">digdag-server.example.com:65432</span></code></p>
</dd>
<dt><strong class="command">-H, --header KEY=VALUE</strong></dt><dd><p>Add a custom HTTP header. Use multiple times to set multiple headers.</p>
</dd>
<dt><strong class="command">--basic-auth <user:pass></strong></dt><dd><p>Add an Authorization header with the provided username and password.</p>
</dd>
<dt><strong class="command">-c, --config PATH</strong></dt><dd><p>Configuration file to load. (default: ~/.config/digdag/config)</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-c</span> <span class="pre">digdag-server/client.properties</span></code></p>
</dd>
</dl>
<p>You can include following parameters in ~/.config/digdag/config file:</p>
<ul class="simple">
<li><p>client.http.endpoint = <a class="reference external" href="http://HOST:PORT">http://HOST:PORT</a> or <a class="reference external" href="https://HOST:PORT">https://HOST:PORT</a></p></li>
<li><p>client.http.headers.KEY = VALUE (set custom HTTP header)</p></li>
<li><p>client.http.disable_direct_download=true (disable direct download in <cite>log</cite> and <cite>download</cite>. effect to server v0.10.0 or later.)</p></li>
</ul>
<div class="section" id="start">
<h3><a class="toc-backref" href="#id13">start</a><a class="headerlink" href="#start" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag start <project-name> <name> --session <hourly <span class="p">|</span> daily <span class="p">|</span> now <span class="p">|</span> yyyy-MM-dd <span class="p">|</span> <span class="s2">"yyyy-MM-dd HH:mm:ss"</span>>
</pre></div>
</div>
<p>Starts a new session. This command requires project name, workflow name, and session_time. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag start myproj main --dry-run --session hourly
<span class="gp">$</span> digdag start myproj main --session daily
<span class="gp">$</span> digdag start myproj main --session <span class="s2">"2016-01-01 00:00:00"</span>
<span class="gp">$</span> digdag start myproj main --session <span class="s2">"2016-01-01"</span> -p <span class="nv">environment</span><span class="o">=</span>staging -p <span class="nv">user</span><span class="o">=</span>frsyuki
</pre></div>
</div>
<dl>
<dt><strong class="command">--session <hourly | daily | now | yyyy-MM-dd | "yyyy-MM-dd HH:mm:ss"></strong></dt><dd><p>Use this time as session_time.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">daily</span></code> is set, today’s 00:00:00 is used.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">hourly</span></code> is set, this hour’s 00:00 is used.</p>
<p>If a time is set in “yyyy-MM-dd” or “yyyy-MM-dd HH:mm:ss” format, this time is used.</p>
<p>Timezone is based on the workflow’s time zone (not your machine’s time zone). For example, if a workflow uses Europe/Moscow (+03:00), and your machine’s time zone is Asia/Tokyo (+09:00), <code class="docutils literal notranslate"><span class="pre">--session</span> <span class="pre">2016-01-01</span> <span class="pre">00:00:00</span></code> means 2016-01-01 00:00:00 +03:00 (2016-01-01 06:00:00 +09:00).</p>
</dd>
<dt><strong class="command">--retry <name></strong></dt><dd><p>Set retry attempt name to the new attempt. Usually, you will use <code class="docutils literal notranslate"><span class="pre">digdag</span> <span class="pre">retry</span></code> command instead of using this option.</p>
</dd>
<dt><strong class="command">-d, --dry-run</strong></dt><dd><p>Tries to start a new session attempt and validates the results but does nothing.</p>
</dd>
<dt><strong class="command">-p, --param KEY=VALUE</strong></dt><dd><p>Add a session parameter (use multiple times to set many parameters) in KEY=VALUE syntax. This parameter is available using <code class="docutils literal notranslate"><span class="pre">${...}</span></code> syntax in the YAML file, or using language API.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">environment=staging</span></code></p>
<p>Note: Variable defined in _export is not overwritable by –param option.</p>
</dd>
<dt><strong class="command">-P, --params-file PATH</strong></dt><dd><p>Read parameters from a YAML file. Nested parameter (like {mysql: {user: me}}) are accessible using “.” syntax (like ${mysql.user}).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-P</span> <span class="pre">params.yml</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="retry">
<h3><a class="toc-backref" href="#id14">retry</a><a class="headerlink" href="#retry" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag retry <attempt-id>
</pre></div>
</div>
<p>Retry a session. One of revision options (<code class="docutils literal notranslate"><span class="pre">--latest-revision</span></code>, <code class="docutils literal notranslate"><span class="pre">--keep-revision</span></code>, or <code class="docutils literal notranslate"><span class="pre">--revision</span> <span class="pre"><name></span></code>) and one of resume options (<code class="docutils literal notranslate"><span class="pre">--all</span></code>, <code class="docutils literal notranslate"><span class="pre">--resume</span></code>, or <code class="docutils literal notranslate"><span class="pre">--resume-from</span> <span class="pre"><+name></span></code>) are required.</p>
<p>Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag retry <span class="m">35</span> --latest-revision --all
<span class="gp">$</span> digdag retry <span class="m">35</span> --latest-revision --resume
<span class="gp">$</span> digdag retry <span class="m">35</span> --latest-revision --resume-from +step2
<span class="gp">$</span> digdag retry <span class="m">35</span> --keep-revision --resume
<span class="gp">$</span> digdag retry <span class="m">35</span> --revision rev29a87a9c --resume
</pre></div>
</div>
<dl class="simple">
<dt><strong class="command">--latest-revision</strong></dt><dd><p>Use the latest revision to retry the session.</p>
</dd>
<dt><strong class="command">--keep-revision</strong></dt><dd><p>Use the same revision with the specified attempt to retry the session.</p>
</dd>
<dt><strong class="command">--revision <name></strong></dt><dd><p>Use a specific revision to retry the session.</p>
</dd>
<dt><strong class="command">--all</strong></dt><dd><p>Retries all tasks.</p>
</dd>
<dt><strong class="command">--resume</strong></dt><dd><p>Retry only failed tasks. Successfully finished tasks are skipped.</p>
</dd>
<dt><strong class="command">--resume-from +NAME</strong></dt><dd><p>Retry from this task. This task and all following tasks will be executed. All tasks before this task must have been successfully finished.</p>
</dd>
<dt><strong class="command">--name <name></strong></dt><dd><p>An unique identifier of this retry attempt. If another attempt with the same name already exists within the same session, request fails with 409 Conflict.</p>
</dd>
</dl>
</div>
<div class="section" id="log">
<h3><a class="toc-backref" href="#id15">log</a><a class="headerlink" href="#log" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag log <attempt-id> <span class="o">[</span>+task name prefix<span class="o">]</span>
</pre></div>
</div>
<p>Shows logs of a session attempt. This command works only if server (or scheduler) runs with <code class="docutils literal notranslate"><span class="pre">-O,</span> <span class="pre">--task-log</span></code> option.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag log <span class="m">32</span>
<span class="gp">$</span> digdag log <span class="m">32</span> -f
<span class="gp">$</span> digdag log <span class="m">32</span> +main
<span class="gp">$</span> digdag log <span class="m">32</span> +main+task1
</pre></div>
</div>
<dl>
<dt><strong class="command">-v, --verbose</strong></dt><dd><p>Show all logs. By default, log level less than INFO and lines following those lines are skipped.</p>
</dd>
<dt><strong class="command">-f, --follow</strong></dt><dd><p>Show new logs until attempt or task finishes. This is similar to UNIX <code class="docutils literal notranslate"><span class="pre">tail</span> <span class="pre">-f</span></code> command. Because server buffers logs, there’re some delay until logs are actually show.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--follow</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="kill">
<h3><a class="toc-backref" href="#id16">kill</a><a class="headerlink" href="#kill" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag <span class="nb">kill</span> <attempt-id>
</pre></div>
</div>
<p>Kills a session attempt. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag <span class="nb">kill</span> <span class="m">32</span>
</pre></div>
</div>
</div>
<div class="section" id="projects">
<h3><a class="toc-backref" href="#id17">projects</a><a class="headerlink" href="#projects" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag projects <span class="o">[</span>name<span class="o">]</span>
</pre></div>
</div>
<p>Shows list of projects or details of a project. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag projects
<span class="gp">$</span> digdag projects myproj
</pre></div>
</div>
</div>
<div class="section" id="workflows">
<h3><a class="toc-backref" href="#id18">workflows</a><a class="headerlink" href="#workflows" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag workflows <span class="o">[</span>project-name<span class="o">]</span> <span class="o">[</span>name<span class="o">]</span>
</pre></div>
</div>
<p>Shows list of workflows or details of a workflow. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag workflows
<span class="gp">$</span> digdag workflows myproj
<span class="gp">$</span> digdag workflows myproj main
</pre></div>
</div>
</div>
<div class="section" id="schedules">
<h3><a class="toc-backref" href="#id19">schedules</a><a class="headerlink" href="#schedules" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag schedules
</pre></div>
</div>
<p>Shows list of schedules.</p>
</div>
<div class="section" id="disable">
<h3><a class="toc-backref" href="#id20">disable</a><a class="headerlink" href="#disable" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag disable <span class="o">[</span>project-name<span class="o">]</span>
</pre></div>
</div>
<p>Disable all workflow schedules in a project.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag disable <span class="o">[</span>schedule-id<span class="o">]</span>
<span class="gp">$</span> digdag disable <span class="o">[</span>project-name<span class="o">]</span> <span class="o">[</span>name<span class="o">]</span>
</pre></div>
</div>
<p>Disable a workflow schedule.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag disable <schedule-id>
<span class="gp">$</span> digdag disable myproj
<span class="gp">$</span> digdag disable myproj main
</pre></div>
</div>
</div>
<div class="section" id="enable">
<h3><a class="toc-backref" href="#id21">enable</a><a class="headerlink" href="#enable" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag <span class="nb">enable</span> <span class="o">[</span>project-name<span class="o">]</span>
</pre></div>
</div>
<p>Enable all workflow schedules in a project.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag <span class="nb">enable</span> <span class="o">[</span>schedule-id<span class="o">]</span>
<span class="gp">$</span> digdag <span class="nb">enable</span> <span class="o">[</span>project-name<span class="o">]</span> <span class="o">[</span>name<span class="o">]</span>
</pre></div>
</div>
<p>Enable a workflow schedule.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag <span class="nb">enable</span> <schedule-id>
<span class="gp">$</span> digdag <span class="nb">enable</span> myproj
<span class="gp">$</span> digdag <span class="nb">enable</span> myproj main
</pre></div>
</div>
</div>
<div class="section" id="backfill">
<h3><a class="toc-backref" href="#id22">backfill</a><a class="headerlink" href="#backfill" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag backfill <schedule-id>
<span class="gp">$</span> digdag backfill <project-name> <name>
</pre></div>
</div>
<p>Starts sessions of a schedule for past session times.</p>
<dl>
<dt><strong class="command">-f, --from 'yyyy-MM-dd[ HH:mm:ss]'</strong></dt><dd><p>Timestamp to start backfill from (required). Sessions from this time (including this time) until current time will be started.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--from</span> <span class="pre">'2016-01-01'</span></code></p>
</dd>
<dt><strong class="command">--count N</strong></dt><dd><p>Starts given number of sessions. By default, this command starts all sessions until current time.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--count</span> <span class="pre">5</span></code></p>
</dd>
<dt><strong class="command">--name NAME</strong></dt><dd><p>Unique name of the new attempts (required). This name is used not to run backfill sessions twice accidentally.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--name</span> <span class="pre">backfill1</span></code></p>
</dd>
<dt><strong class="command">-d, --dry-run</strong></dt><dd><p>Tries to backfill and validates the results but does nothing.</p>
</dd>
</dl>
</div>
<div class="section" id="reschedule">
<h3><a class="toc-backref" href="#id23">reschedule</a><a class="headerlink" href="#reschedule" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag reschedule <schedule-id>
<span class="gp">$</span> digdag reschedule <project-name> <name>
</pre></div>
</div>
<p>Skips a workflow schedule forward to a future time. To run past schedules, use backfill instead.</p>
<dl class="simple">
<dt><strong class="command">-s, --skip N</strong></dt><dd><p>Skips specified number of schedules from now. This number “N” doesn’t mean number of sessions to be skipped. “N” is the number of sessions to be skipped.</p>
</dd>
<dt><strong class="command">-t, --skip-to 'yyyy-MM-dd HH:mm:ss Z'</strong></dt><dd><p>Skips schedules until the specified time (exclusive).</p>
</dd>
<dt><strong class="command">-a, --run-at 'yyyy-MM-dd HH:mm:ss Z'</strong></dt><dd><p>Set next run time to this time.</p>
</dd>
<dt><strong class="command">-d, --dry-run</strong></dt><dd><p>Tries to reschedule and validates the results but does nothing.</p>
</dd>
</dl>
</div>
<div class="section" id="sessions">
<h3><a class="toc-backref" href="#id24">sessions</a><a class="headerlink" href="#sessions" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag sessions <span class="o">[</span>project-name<span class="o">]</span> <span class="o">[</span>name<span class="o">]</span>
</pre></div>
</div>
<p>Shows list of sessions. This command shows only the latest attempts of sessions (doesn’t include attempts retried by another attempt). To show all attempts, use <code class="docutils literal notranslate"><span class="pre">digdag</span> <span class="pre">attempts</span></code>. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag sessions
<span class="gp">$</span> digdag sessions myproj
<span class="gp">$</span> digdag sessions myproj main
</pre></div>
</div>
<dl class="simple">
<dt><strong class="command">-i, --last-id ID</strong></dt><dd><p>Shows more sessions older than this id.</p>
</dd>
<dt><strong class="command">-s, --page-size N</strong></dt><dd><p>Shows more sessions of the number of N (in default up to 100).</p>
</dd>
</dl>
</div>
<div class="section" id="session">
<h3><a class="toc-backref" href="#id25">session</a><a class="headerlink" href="#session" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag session <span class="o">[</span>session-id<span class="o">]</span>
</pre></div>
</div>
<p>Show a single session. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag session <session-id>
</pre></div>
</div>
</div>
<div class="section" id="attempts">
<h3><a class="toc-backref" href="#id26">attempts</a><a class="headerlink" href="#attempts" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag attempts <span class="o">[</span>session-id<span class="o">]</span>
</pre></div>
</div>
<p>Shows list of attempts. This command shows all attempts including attempts retried by another attempt. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag attempts
<span class="gp">$</span> digdag attempts <session-id>
</pre></div>
</div>
<dl class="simple">
<dt><strong class="command">-i, --last-id ID</strong></dt><dd><p>Shows more attempts older than this id.</p>
</dd>
<dt><strong class="command">-s, --page-size N</strong></dt><dd><p>Shows more attempts of the number of N (in default up to 100).</p>
</dd>
</dl>
</div>
<div class="section" id="attempt">
<h3><a class="toc-backref" href="#id27">attempt</a><a class="headerlink" href="#attempt" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag attempt <span class="o">[</span>attempt-id<span class="o">]</span>
</pre></div>
</div>
<p>Shows a single attempt. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag attempt <attempt-id>
</pre></div>
</div>
</div>
<div class="section" id="tasks">
<h3><a class="toc-backref" href="#id28">tasks</a><a class="headerlink" href="#tasks" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag tasks <attempt-id>
</pre></div>
</div>
<p>Shows tasks of an session attempt. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag tasks <span class="m">32</span>
</pre></div>
</div>
</div>
<div class="section" id="push">
<h3><a class="toc-backref" href="#id29">push</a><a class="headerlink" href="#push" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag push <project> <span class="o">[</span>options...<span class="o">]</span>
</pre></div>
</div>
<p>Creates a project archive and upload it to the server. This command uploads workflow definition files (files with .dig suffix) at the current directory, and all other files from the current directory recursively. Examples:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag push myproj -r <span class="s2">"</span><span class="k">$(</span>date +%Y-%m-%dT%H:%M:%S%z<span class="k">)</span><span class="s2">"</span>
<span class="gp">$</span> digdag push default -r <span class="s2">"</span><span class="k">$(</span>git show --pretty<span class="o">=</span>format:<span class="s1">'%T'</span> <span class="p">|</span> head -n <span class="m">1</span><span class="k">)</span><span class="s2">"</span>
</pre></div>
</div>
<dl>
<dt><strong class="command">--project DIR</strong></dt><dd><p>Use this directory as the project directory (default: current directory).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--project</span> <span class="pre">workflow/</span></code></p>
</dd>
<dt><strong class="command">-r, --revision REVISION</strong></dt><dd><p>Unique name of the revision. If this is not set, a random UUID is automatically generated. Typical argument is git’s SHA1 hash (<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">show</span> <span class="pre">--pretty=format:'%T'</span> <span class="pre">|</span> <span class="pre">head</span> <span class="pre">-n</span> <span class="pre">1</span></code>) or timestamp (<code class="docutils literal notranslate"><span class="pre">date</span> <span class="pre">+%Y-%m-%dT%H:%M:%S%z</span></code>).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-r</span> <span class="pre">f40172ebc58f58087b6132085982147efa9e81fb</span></code></p>
</dd>
<dt><strong class="command">--schedule-from "yyyy-MM-dd HH:mm:ss Z"</strong></dt><dd><p>Start schedules from this time. If this is not set, system time of the server is used. Parameter must include time zone offset. You can run <code class="docutils literal notranslate"><span class="pre">date</span> <span class="pre">\"+%Y-%m-%d</span> <span class="pre">%H:%M:%S</span> <span class="pre">%z\"</span></code> command to get current local time.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--schedule-from</span> <span class="pre">"2017-07-29</span> <span class="pre">00:00:00</span> <span class="pre">+0200"</span></code></p>
</dd>
<dt><strong class="command">--copy-outgoing-symlinks</strong></dt><dd><p>Transform symlinks to regular files or directories if the symlink points a file or directory outside of the target directory. Without this option, such case fails because the files or directories won’t be included unless copying.</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">--copy-outgoing-symlinks</span></code></p>
</dd>
</dl>
<p>Digdag excludes files start with dot (<code class="docutils literal notranslate"><span class="pre">.</span></code>) from project archives.
If you want to exclude other files, put a file named <code class="docutils literal notranslate"><span class="pre">.digdagignore</span></code> in the project root directory and write patterns to ignore in the same way as <code class="docutils literal notranslate"><span class="pre">.gitignore</span></code>.</p>
</div>
<div class="section" id="download">
<h3><a class="toc-backref" href="#id30">download</a><a class="headerlink" href="#download" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag download <project>
</pre></div>
</div>
<p>Downloads a project archive and extract to a local directory.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag download myproj
<span class="gp">$</span> digdag download myproj -o output
<span class="gp">$</span> digdag download myproj -r rev20161106
</pre></div>
</div>
<dl>
<dt><strong class="command">-o, --output DIR</strong></dt><dd><p>Extract contents to this directory (default: same with project name).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-o</span> <span class="pre">output</span></code></p>
</dd>
<dt><strong class="command">-r, --revision REVISION</strong></dt><dd><p>Download project archive of this revision (default: latest revision).</p>
<p>Example: <code class="docutils literal notranslate"><span class="pre">-r</span> <span class="pre">f40172ebc58f58087b6132085982147efa9e81fb</span></code></p>
</dd>
</dl>
</div>
<div class="section" id="delete">
<h3><a class="toc-backref" href="#id31">delete</a><a class="headerlink" href="#delete" title="Permalink to this headline">¶</a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag delete <project> <span class="o">[</span>options...<span class="o">]</span>
</pre></div>
</div>
<p>Deletes a project. Sessions of the deleted project are kept retained so that we can review status of past executions later.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag delete myproj
</pre></div>
</div>
<dl class="simple">
<dt><strong class="command">--force</strong></dt><dd><p>Skip y/N prompt</p>
</dd>
</dl>
</div>
<div class="section" id="secrets">
<h3><a class="toc-backref" href="#id32">secrets</a><a class="headerlink" href="#secrets" title="Permalink to this headline">¶</a></h3>
<p>Digdag provides basic secret management that can be used to securely provide e.g. passwords and api keys etc to operators.</p>
<p>Secrets are handled separately from normal workflow parameters and are stored encrypted by the server. Local secrets are stored in the user home directory.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag secrets --project <project>
</pre></div>
</div>
<p>List secrets set for a project. This will only list the secret keys and will not show the actual secret values.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag secrets --project <project> --set key
</pre></div>
</div>
<p>Set a secret key value for a project. The cli will prompt for the secret value to be entered in the terminal. The entered
value will not be displayed.</p>
<p>Multiple secrets can be entered by listing multiple keys.</p>
<p>It is also possible to read a secret value from a file. Note that the entire raw file contents are read and used as the
secret value. Any whitespace and newlines etc are included as-is.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> cat secret.txt
<span class="go">foobar</span>
<span class="gp">$</span> digdag secrets --project <project> --set <span class="nv">key</span><span class="o">=</span>@secret.txt
</pre></div>
</div>
<p>Multiple secrets can be read from a single file in JSON format.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> cat secrets.json
<span class="go">{</span>
<span class="go"> "foo": "secret1",</span>
<span class="go"> "bar": "secret2"</span>
<span class="go">}</span>
<span class="gp">$</span> digdag secrets --project <project> --set @secrets.json
</pre></div>
</div>
<p>Secrets can also be read from stdin. The below command would set the secret key <cite>foo</cite> to the value <cite>bar</cite>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">echo</span> -n <span class="s1">'bar'</span> <span class="p">|</span> digdag secrets --project <project> --set <span class="nv">foo</span><span class="o">=</span>-
</pre></div>
</div>
<p>Note that only one secret value can be read using the above command. To read multiple secrets from stdin, omit the secret key
name on the command line and provide secret keys and values on stdin in JSON format.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> <span class="nb">echo</span> -n <span class="s1">'{"foo": "secret1", "bar": "secret2"}'</span> <span class="p">|</span> digdag secrets --project <project> --set -
<span class="gp">$</span> cat secrets.json <span class="p">|</span> digdag secrets --project <project> --set -
</pre></div>
</div>
<p>To delete secrets, use the <cite>–delete</cite> command.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag secrets --project <project> --delete foo bar
</pre></div>
</div>
<p>Secrets can also be used in local mode. Local secrets are used when running workflows in local mode using <cite>digdag run</cite>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> digdag secrets --local
</pre></div>