<@U04S8PLJWMT> want to ask about GCS source, can w...
# replication-ask-ai
a
@kapa.ai want to ask about GCS source, can we ingest from zip file? because i cant find the compression field. Currently we use 2.0.1 Version for airbytes
k
You can ingest ZIP files with the GCS source, but only on recent connector versions. From the GCS source changelog: • Version 0.7.0: “Add
.zip
files support”. [GCS source changelog] So: • ZIP support exists in the GCS source connector ≥ 0.7.0. • If your Airbyte platform is 2.0.1, that’s the core platform version; you still need to check and upgrade the GCS source connector version in the UI to at least 0.7.0 to read ZIP files. • The docs snippet doesn’t show a dedicated “compression” field for GCS source; ZIP handling is built into the connector version rather than exposed as a separate compression option in the config. [GCS source changelog] If in your workspace the GCS source connector is below 0.7.0, you’ll need to upgrade that connector to ingest from ZIP files. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai currently on our gcs version: 0.10.5
k
You’re already on GCS source 0.10.5, which is newer than 0.7.0, so ZIP files are supported by your connector version. The changelog entry: > 0.7.0 – “Add .zip files support” [GCS source changelog] confirms that any version ≥ 0.7.0 (including 0.10.5) can read
.zip
files. A few important points based on the docs: • ZIP support is built into the *file-based GCS source*; it doesn’t surface as a separate “compression” dropdown/field in the UI. [GCS source changelog] • You still need to: ◦ Make sure your glob pattern matches the
.zip
files (for example,
sales/*.zip
or
sales/salesreport_*.zip
depending on your folder structure). [GCS glob issue] ◦ Configure the file format/stream type correctly (CSV/JSON/etc.) so the connector knows how to parse the unzipped content. If you’re not seeing a compression field, that’s expected; ZIP handling is automatic once the connector sees
.zip
files and the stream is configured correctly. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai i see so how to configure blob? because on my zip file is .csv
k
To ingest a CSV inside a ZIP from GCS, you configure the GCS source stream as a CSV file format and use globs that match the
.zip
files; the connector will handle the ZIP automatically (no separate compression field). ZIP support is present in recent GCS versions. [GCS source changelog] Here’s how to set it up in the GCS source: 1. Add / edit a stream ◦ In your GCS source, click Add stream (or edit an existing one). ◦ Set Name as you like (e.g.
sales_csv_from_zip
). 2. Format = CSV ◦ In the Format box, choose CSV. ◦ Optionally expand Optional fields and configure delimiter, header options, encoding, etc., according to how the CSV inside the ZIP is structured. [GCS file format] 3. Globs to point at ZIP files ◦ In Globs, use a pattern that matches your ZIP files, e.g.: ▪︎
**/*.zip
– all ZIPs in the bucket, or ▪︎
sales/*.zip
– all ZIPs in the
sales
folder, or ▪︎
sales/salesreport_*.zip
– only files like
salesreport_202401.zip
in
sales
. [GCS path patterns; GCS setup] Remember: patterns are relative to the bucket root (do not include the bucket name). [GCS path patterns] 4. Other options (optional) ◦ You can set Start Date so only files modified after that date are read. [GCS setup] ◦ Optionally provide an Input schema if you don’t want automatic schema inference. [GCS setup] Once this is configured, the GCS source will: • Find files via your globs. • Detect they are
.zip
. • Unzip them and parse the inner CSV using your CSV settings. If your ZIPs are not being picked up, double‑check the exact folder/filename and adjust the glob (you can temporarily use
**/*.zip
to confirm matching). [GCS path patterns] 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai so basically, on my version now, zip will auto read right?
k
Yes. On your current GCS source version 0.10.5,
.zip
files are supported and will be handled automatically when they match your Globs pattern and you configure the inner file format correctly (e.g., CSV). ZIP support was added starting in 0.7.0, so all later versions (including 0.10.5) can read
.zip
files. [GCS changelog] You just need to: • Set Format to the type inside the ZIP (CSV/JSONL/etc.). [GCS file format] • Use a Globs pattern that matches the
.zip
files, e.g.
**/*.zip
or
sales/salesreport_*.zip
. [GCS path patterns] 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai got this error: Configuration check failed Traceback (most recent call last): File "/airbyte/integration_code/source_gcs/stream_reader.py", line 112, in get_matching_files if remote_file.mime_type == "zip" and self.config.delivery_method.delivery_type != DeliverRawFiles.delivery_type: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: type object 'DeliverRawFiles' has no attribute 'delivery_type' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/airbyte_cdk/sources/file_based/availability_strategy/default_file_based_availability_strategy.py", line 100, in _check_list_files file = next(iter(stream.get_files())) File "/airbyte/integration_code/source_gcs/stream_reader.py", line 117, in get_matching_files self._handle_file_listing_error(exc, prefix, logger) why
k
The knowledge sources don’t mention this specific error, so I can’t say with certainty why it happens internally, but here’s what we can infer from the docs and what you can do. From the stack trace:
Copy code
if remote_file.mime_type == "zip" and self.config.delivery_method.delivery_type != DeliverRawFiles.delivery_type:
AttributeError: type object 'DeliverRawFiles' has no attribute 'delivery_type'
This line is checking: • if the file is a ZIP (
mime_type == "zip"
) • and if the delivery method is not “Copy raw files” (i.e., you’re using Replicate records). [Delivery methods] The error suggests a mismatch between: • the GCS connector code that expects a
DeliverRawFiles.delivery_type
attribute, and • the delivery method model actually available in your Airbyte/CDK version. This looks like a version compatibility bug between: • your Airbyte core version (2.0.1) and • the GCS source 0.10.5 (which is quite new and has recent changes around ZIP and delivery methods). [GCS changelog] The docs do state: • GCS supports delivery_method with
replicate_records
and
copy_raw_files
options. [GCS delivery_method schema] • “Copy raw files” is specifically recommended for compressed files. [Delivery methods] What you can try 1. Switch delivery method to “Copy raw files” for this GCS source, if available in your UI: ◦ In the GCS source config, under Delivery Method, choose Copy raw files instead of Replicate records. [Delivery methods] ◦ This aligns with the code path that’s checking ZIP + delivery method and may avoid the failing branch. 2. If you don’t need to parse inside the ZIP yet, “Copy raw files” is the recommended mode for compressed files anyway. [Delivery methods] 3. If the error persists even with Copy raw files, it’s likely a genuine compatibility bug between: ◦ Airbyte 2.0.1 core and ◦ GCS 0.10.5 (or the CDK version it uses), which is not documented in the provided sources. In that case, based on the docs I can only recommend: • Try downgrading the GCS connector to a slightly earlier version that still has ZIP support (≥ 0.7.0) but may be more compatible with 2.0.1, or • Upgrade Airbyte core to a newer version that matches the latest file-based CDK used by GCS 0.10.x. Because this exact
DeliverRawFiles.delivery_type
error is not documented in the knowledge sources, I can’t give a more precise fix. I’d suggest sharing this stack trace in the Airbyte forum or Slack so the team can confirm the correct version pairing for GCS 0.10.5 and Airbyte 2.0.x. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai Switch delivery method to “Copy raw files” for this GCS source, if available in your UI: ◦ In the GCS source config, under Delivery Method, choose Copy raw files instead of Replicate records. [Delivery methods] ◦ This aligns with the code path that’s checking ZIP + delivery method and may avoid the failing branch. i cant see delivery method on UI, i there any other way?
k
The knowledge sources don’t show a way to “force‑set” the delivery method from the UI if the option isn’t visible, and they also don’t document this specific error, so there’s some uncertainty here. From the docs: • GCS has a
delivery_method
config with two options:
replicate_records
and
copy_raw_files
. [GCS delivery_method schema] • In general, “Copy raw files” can only be configured for specific file‑based connectors, and in many cases the option simply isn’t present in the UI if the connector/platform combination doesn’t support it. [Delivery methods] Because you don’t see “Delivery method” in the UI, that likely means: • On your Airbyte 2.0.1 + GCS 0.10.5 combination, the UI is not exposing the
delivery_method
toggle, even though the connector spec supports it. The only documented alternative way to set
delivery_method
is via tools that talk directly to the Airbyte API using the connector spec, such as: • Terraform provider: the
airbyte_source_gcs
resource shows how to set
delivery_method.copy_raw_files
in configuration. [GCS Terraform resource; copy_raw_files schema] Example from the Terraform docs:
Copy code
resource "airbyte_source_gcs" "my_source_gcs" {
  configuration = {
    bucket = "...my_bucket..."
    credentials = {
      service_account_authentication = {
        service_account = "...my_service_account..."
      }
    }
    delivery_method = {
      copy_raw_files = {
        preserve_directory_structure = false
      }
    }
    # ...
  }
  # ...
}
This shows that, at least via Terraform / API, you can set
delivery_method.copy_raw_files
even if the UI doesn’t show it. [GCS Terraform resource] If you are not using Terraform or the public API, the docs don’t provide another documented workaround from the UI alone. Given the error you’re seeing and the missing UI control, the safest next steps (based on the docs) are: 1. Configure the GCS source via Terraform or API and explicitly set
delivery_method.copy_raw_files
. [GCS Terraform resource] 2. If that’s not possible, consider adjusting versions (either Airbyte core or GCS connector) and/or open a ticket / post in the forum with this exact stack trace, since this mismatch between ZIP handling and delivery method isn’t covered in the current documentation. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.