Skip to content
This repository was archived by the owner on Dec 5, 2020. It is now read-only.

Commit 7811cd2

Browse files
authored
Make runId for datasets optional for write only client (#103)
Signed-off-by: wslulciuc <[email protected]>
1 parent dc30b85 commit 7811cd2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

marquez_client/client_wo.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def create_source(self, source_name, source_type, connection_url,
7272

7373
# Datasets API
7474
def create_dataset(self, namespace_name, dataset_name, dataset_type,
75-
physical_name, source_name, run_id,
75+
physical_name, source_name, run_id=None,
7676
description=None, schema_location=None,
7777
fields=None, tags=None):
7878
Utils.check_name_length(namespace_name, 'namespace_name')
@@ -82,20 +82,21 @@ def create_dataset(self, namespace_name, dataset_name, dataset_type,
8282
if dataset_type == DatasetType.STREAM:
8383
Utils.is_none(schema_location, 'schema_location')
8484

85-
Utils.is_none(run_id, 'run_id')
8685
Utils.check_name_length(physical_name, 'physical_name')
8786
Utils.check_name_length(source_name, 'source_name')
8887

8988
payload = {
9089
'type': dataset_type.value,
9190
'physicalName': physical_name,
9291
'sourceName': source_name,
93-
'runId': run_id,
9492
}
9593

9694
if description:
9795
payload['description'] = description
9896

97+
if run_id:
98+
payload['runId'] = run_id
99+
99100
if fields:
100101
payload['fields'] = fields
101102

0 commit comments

Comments
 (0)