You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client APIs for dealing with tables has gotten a little too nested and intricate. This issue investigates if we can settle on a flatter and more straightforward interface. Ideally, we can unify the lower-level and "easy" functions in one interface. It seems it's okay to be slightly less verbose than we are today (the verbosity might actually be adding complexity).
Risks and challenges
Balance between verbosity and simplicity
Is it a sufficient leap in simplicity?
Make sure it's portable to JS and the upcoming Go client
Involved components
Python client
Data server
Proposed changes
WIP alert! Starting with the UX, I imagine a refactored Python client interface like this:
table=awaitclient.table("user/project/table", schema=...)
table=awaittable.version(...) # optional# writingawaittable.write(records, deletes=...)
# queryingcursor=awaittable.log(replay=True, changes=True, subscription=...) # consumers embeddedcursor=awaittable.index("time >= '2021-02-01'")
cursor=awaitclient.olap(f"SELECT count(*) FROM {table}")
# readingdf=awaitcursor.df()
records=awaitcursor.all()
asyncforrecordincursor:
print(record)
asyncforbatchincursor.batches(size=...):
print(record)
awaitcursor.consume(callback)
# + consumer APIs, including batching and time delay# get/set featuresawaittable.get({ ... }) # maps to table.indexawaittable.set({ ... }, { ... }) # oltp writes (+ ability to pass timestamp to fence writes)awaittable.delete({ ... }) # oltp delete# checkpointers?
The text was updated successfully, but these errors were encountered:
Summary
The client APIs for dealing with tables has gotten a little too nested and intricate. This issue investigates if we can settle on a flatter and more straightforward interface. Ideally, we can unify the lower-level and "easy" functions in one interface. It seems it's okay to be slightly less verbose than we are today (the verbosity might actually be adding complexity).
Risks and challenges
Involved components
Proposed changes
WIP alert! Starting with the UX, I imagine a refactored Python client interface like this:
The text was updated successfully, but these errors were encountered: