Working with Google Cloud Storage
Google Cloud Platform (GCP) is another major cloud provider in the industry. Google Cloud Storage (GCS) is an object file store on GCP. Polars can work with it by utilizing the GCSFS library.
In this recipe, we’ll look at how to read from and write to a GCS in Polars.
Getting ready
You need your GCP account for this recipe. Follow the instructions in the link I mentioned under Technical requirements to create your GCP account.
Let’s first create a Google Cloud Storage bucket and upload a file to it:
- Navigate to Cloud Storage and click on CREATE.
Figure 11.34 – Creating a cloud storage bucket
- Enter your bucket name and leave the rest of the settings as they are. Note that each bucket name is globally unique. I suggest that you add your name or initials as a suffix. Once you have clicked CREATE to create a bucket, you may be asked to enforce public access prevention. Make...