Skip to content

Commit 0fef7b6

Browse files
author
Chris Turner
committed
06-distributed-computing_jobs_by_key.rst: include table name in example
1 parent c127fac commit 0fef7b6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs-parts/computation/06-distributed-computing_jobs_by_key.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ This can be done by using `dj.key_hash` to convert the key as follows:
33

44
.. code-block:: python
55
6-
In [4]: schema.jobs & {'key_hash' : dj.key_hash({'id': 2})}
7-
Out[4]:
6+
In [4]: jk = {'table_name': '__job_results', 'key_hash' : dj.key_hash({'id': 2})}
7+
In [5]: schema.jobs & jk
8+
Out[5]:
89
*table_name *key_hash status key error_message error_stac user host pid connection_id timestamp
910
+------------+ +------------+ +--------+ +--------+ +------------+ +--------+ +------------+ +-------+ +--------+ +------------+ +------------+
1011
__job_results c81e728d9d4c2f error =BLOB= KeyboardInterr =BLOB= datajoint@localhost localhost 15571 59 2017-09-04 14:
1112
(Total: 1)
1213
13-
In [5]: (schema.jobs & {'key_hash' : dj.key_hash({'id': 2})}).delete()
14+
In [6]: (schema.jobs & jk).delete()
1415
15-
In [6]: schema.jobs & {'key_hash' : dj.key_hash({'id': 2})}
16-
Out[6]:
16+
In [7]: schema.jobs & jk
17+
Out[7]:
1718
*table_name *key_hash status key error_message error_stac user host pid connection_id timestamp
1819
+------------+ +----------+ +--------+ +--------+ +------------+ +--------+ +------+ +------+ +-----+ +------------+ +-----------+
1920

0 commit comments

Comments
 (0)