โ02-10-2023 01:22 PM
Hey all, does anyone know how to suppress the output of dbutils.fs.put() ?
โ02-21-2023 04:46 AM
Hi @Jordan Foxโ , Thank you for your detailed explanation.
dbutils.fs.put() is a method in Databricks that allows you to write a file to DBFS (Databricks File System).
DBFS is a distributed file system integrated with Databricks and provides a scalable and reliable way to store and access data.
The dbutils.fs.put takes just three arguments:-
It does not take the 4th argument as of now. We will take down your suggestions and update them soon.
You can also submit your suggestion in our "DEAS" portal. The Ideas Portal lets you influence the Databricks product roadmap by providing feedback directly to the product team.
Note:-
If you go directly to ideas.databricks.com and do not have an active Databricks workspace session, you will be prompted to log into Databricks first.
If the sign-in system cannot determine your Databricks workspace, you may be prompted to enter your workspace domain, which has the format <deployment-name>.cloud.databricks.com.
โ02-10-2023 09:28 PM
what mean by suppress , can you please share code block
โ02-12-2023 07:22 PM
write dbutils.fs.put('abfs://some_address_to_some_abfs_location_you_have/helloworld.txt','Hello World',True) and notice that it outputs "Wrote X bytes." to the console stdout. I don't want "Wrote X bytes" to be written to the console.
You can suppress dbutils.fs.put()'s output by setting sys.stdout = open("/dev/null","w") and just writing it out somewhere useless, but this doesn't work in a threaded application.
I could suppress the output by getting rid of sys.stdout like above, and then use logging, and write warnings, but I'd rather not have a warning written as I'm using warnings and errors for other purposes.
โ02-12-2023 11:14 PM
Hi @Jordan Foxโ
Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.
We'd love to hear from you.
Thanks!
โ02-13-2023 09:32 PM
No, have not resolved the issue. Still Wrote 105783245 bytes. If dbutils.fs.put(), which is:
put(file: String, contents: String, overwrite: boolean = false): boolean -> Writes the given String out to a file, encoded in UTF-8
Could instead be:
put(file: String, contents: String, overwrite: boolean = false, verbose: boolean = true): boolean -> Writes the given String out to a file, encoded in UTF-8, defaults message to stdout unless verbose=false
That would be great.
โ02-21-2023 04:46 AM
Hi @Jordan Foxโ , Thank you for your detailed explanation.
dbutils.fs.put() is a method in Databricks that allows you to write a file to DBFS (Databricks File System).
DBFS is a distributed file system integrated with Databricks and provides a scalable and reliable way to store and access data.
The dbutils.fs.put takes just three arguments:-
It does not take the 4th argument as of now. We will take down your suggestions and update them soon.
You can also submit your suggestion in our "DEAS" portal. The Ideas Portal lets you influence the Databricks product roadmap by providing feedback directly to the product team.
Note:-
If you go directly to ideas.databricks.com and do not have an active Databricks workspace session, you will be prompted to log into Databricks first.
If the sign-in system cannot determine your Databricks workspace, you may be prompted to enter your workspace domain, which has the format <deployment-name>.cloud.databricks.com.
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.