<@U04S8PLJWMT> why doesnt airbyte's source postgre...
# ask-ai
t
@kapa.ai why doesnt airbyte's source postgres connector convert jsonb columns to object?
k
Airbyte's source Postgres connector currently maps JSONB columns to the string type instead of object. This behavior has been reported as an issue by users, as it causes problems when syncing to destinations like Redshift, which have much smaller size limits for strings compared to objects (e.g., 65KB for strings vs. 16MB for objects). The main reason for this is that, during schema discovery, the connector identifies JSON/JSONB columns as strings rather than as objects, which prevents proper type mapping and can lead to data loss or sync issues in some destinations. This limitation is acknowledged by the Airbyte team and community, and there are open issues requesting improvements to map JSON/JSONB columns to the object type instead of string. However, as of now, this improvement has not been implemented, and users have to rely on workarounds or face the limitations imposed by the current mapping behavior. The issue is considered important, especially for users who need to move large or complex JSON data between systems without truncation or type mismatches, but it has not yet been prioritized for resolution by the Airbyte team [source-postgres JSONB field shows as string](https://github.com/airbytehq/airbyte/issues/36327).
t
@kapa.ai what are the workarounds?
k
A message from kapa.ai
Based on the knowledge sources provided, users facing the issue of Airbyte's source Postgres connector mapping JSONB columns to string (instead of object) have mentioned using "workarounds," but the specific details of these workarounds are not described in the available sources. One user in the GitHub issue thread states, "We have to use a nasty workaround I can't wait to ditch," but does not elaborate further. Another user expresses difficulty in finding a workaround that would work for their use case, indicating that practical, effective workarounds may be limited or cumbersome for some scenarios. Therefore, I'm sorry, but the knowledge sources do not contain enough information to provide specific, documented workarounds for this issue with Airbyte's source Postgres connector mapping JSONB columns to string instead of object. If you need a workaround, you may need to explore custom post-processing or transformation outside of Airbyte, but this is not explicitly covered in the provided sources [JSONB field shows as string](https://github.com/airbytehq/airbyte/issues/36327).
t
@kapa.ai how are docker images build of connectors now, i dont see a dockerfile inside the specific source connector folder for postgres?
k
A message from kapa.ai
Airbyte no longer requires a
Dockerfile
inside each connector folder (such as for the source-postgres connector). Instead, Airbyte uses an internal build process managed by the
airbyte-ci
tool. The connector's base image is specified in the
metadata.yaml
file under the
data.connectorBuildOptions.baseImage
key. When you run the build command, Airbyte uses this base image and its internal logic to build the connector image, making the
Dockerfile
obsolete for most connectors. To build a connector image, you typically run:
Copy code
airbyte-ci connectors --name source-<source-name> build
This command builds the connector image using the specified base image and your connector code, and the resulting image will appear in your local Docker host as
airbyte/source-<source-name>:dev
 [Migration Guide: How to make a python connector use our base image](https://docs.airbyte.com/platform/connector-development/cdk-python/migration-to-base-image) [Connector Contributions](https://docs.airbyte.com/platform/contributing-to-airbyte/developing-locally#connector-contributions). If your connector needs custom system dependencies or environment variables, you can add a
build_customization.py
file to customize the build process, rather than editing a
Dockerfile
 [Migration Guide: How to make a python connector use our base image](https://docs.airbyte.com/platform/connector-development/cdk-python/migration-to-base-image). In summary: Docker images for connectors are now built using Airbyte's internal tooling and base images, not individual Dockerfiles in each connector folder.