Closed MrPowers closed 1 month ago
I'm not opposed to that, though I don't think there's as strong a case for deltalake to encourage that import pattern over just importing what you need. Pandas, NumPy, and Dask are libraries that have a big API where a user might need so many functions that importing them individually would be annoying. deltalake is much smaller; you typically just need DeltaTable
and one or two more things. But I think it is common for data scientists/engineers to use the abbreviation import pattern.
My one worry is whether there is already another library that might use the dl
abbreviation. pd
, np
, and dd
are all universally recognized. I didn't see any packages used with dl
when I googled, but something to think about.
@wjones127 - yea, I could go either way on this too. My opinion on import deltalake as dl
being the "best" import pattern is weakly held.
I think this import pattern would help users avoid class name collisions between classes like DeltaTable
that are defined in delta-rs & delta. That class name collusion actually tripped me up in the past.
Feel free to close this one or let me know if I should add a PR with this update. Thank you!
The documentation currently uses import statements like this:
I usually see Python import statements like this:
Should we refactor the docs to use this import syntax:
If we follow this import syntax we'll have to do
dl.DeltaTable("../rust/tests/data/delta-0.2.0")
anddl.DataCatalog.AWS
, but I actually think this namespacing is nice. Let me know if you're alright with this suggestion and I'll be happy to submit a pull request to update the docs, thanks!