Skip to content

Commit

Permalink
Support read_vineyard_dataframe with ObjectID. (#149)
Browse files Browse the repository at this point in the history
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
sighingnow authored Jan 19, 2021
1 parent a7b0727 commit 0d959c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/io/adaptors/read_vineyard_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def read_vineyard_dataframe(
print(json.dumps(ret), flush=True)

name = urlparse(path).netloc
df_id = client.get_name(name)
# the "name" part in URL can be a name, or an ObjectID for convenience.
try:
df_id = client.get_name(name)
except:
df_id = vineyard.ObjectID(name)
dataframes = client.get(df_id)

writer = stream.open_writer(client)
Expand Down

0 comments on commit 0d959c5

Please sign in to comment.