Skip to content

Commit a66a661

Browse files
committed
SYNSD-439 update documentation
1 parent 6f798c3 commit a66a661

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

synapseclient/table.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,14 @@
186186
187187
# upload album covers
188188
for row in data:
189-
file_handle = syn.uploadSynapseManagedFileHandle(os.path.join(covers_dir, row[4]))
189+
file_handle = syn.uploadFileHandle(os.path.join(covers_dir, row[4]), parent=project)
190190
row[4] = file_handle['id']
191191
192192
# store the table data
193-
row_reference_set = syn.store(RowSet(columns=cols, schema=schema, rows=[Row(r) for r in data]))
193+
row_reference_set = syn.store(RowSet(schema=schema, rows=[Row(r) for r in data]))
194194
195195
# Later, we'll want to query the table and download our album covers
196-
results = syn.tableQuery("select artist, album, 'year', catalog, cover from %s where artist = 'Sonny Rollins'" \
197-
% schema.id)
196+
results = syn.tableQuery(f"select artist, album, cover from {schema.id} where artist = 'Sonny Rollins'")
198197
cover_files = syn.downloadTableColumns(results, ['cover'])
199198
200199
-------------

0 commit comments

Comments
 (0)