Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12545

WriteToFile should support mime/encoding.

Details

    • Improvement
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 2.30.0
    • 2.33.0
    • io-py-files
    • None

    Description

      For our use case, we need to write blobs to GCS. Also, we want to have both Content-Type and Content-Encoding set for these blobs.
      Since WriteToFiles currently only calls Filesystem.create without mime_type and compression_type, the resulting blobs are of type octet-stream.

      We imagine this to look something like:

       metadata = sink.metadata()
       full_file_name, writer = _create_writer(base_path=self.base_path.get(),
       writer_key=(destination, w),
       mime_type=metadata.mime_type,
       compression_type=metadata.compression_type)
      

      WDYT?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              abergmeier Andreas Bergmeier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m