SneaksAndData / adapta

Logging, data connectors, monitoring, secret handling and general lifehacks to make data people lives easier.
Apache License 2.0
8 stars 1 forks source link

[FEATURE] Functionality to copy DataSocket instance and change its related path #455

Open Jupetus opened 3 months ago

Jupetus commented 3 months ago

We usually generate new Datasockets based on existing sockets. It would be helpful to have method that returns instance of DataSocket and returns copy of it with new path.

e.g.

old_socket = AdlsGen2Path.from_hdfs_path("abfss://container@account.dfs.core.windows.net/folder/file")
new_socket = old_socket.update_path('folder/new_file_2')
print(old_socket)
print(new_socket)

Sockets should be identical apart from new socket having .path attribute folder/new_file_2