Yoaquim Cintron
10/20/2023, 6:03 PMkapa.ai
10/20/2023, 6:04 PMjson { "airline": "alaska", "origin": { "airport_code": "SFO", "terminal": "2", "gate": "G23" }, "destination": { "airport_code": "JFK", "terminal": "7", "gate": "1" } } The AirbyteCatalog would model this as follows: json { "streams": [ { "name": "flights", "supported_sync_modes": [ "full_refresh" ], "source_defined_cursor": false, "json_schema": { "type": "object", "properties": { "airline": { "type": "string" }, "origin": { "type": "object", "properties": { "airport_code": { "type": "string" }, "terminal": { "type": "string" }, "gate": { "type": "string" } } }, "destination": { "type": "object", "properties": { "airport_code": { "type": "string" }, "terminal": { "type": "string" }, "gate": { "type": "string" } } } } } } ] } When it comes to writing these records to a destination, destinations must have handling for all types, but they are free to cast types to a convenient representation. For example, if a destination cannot natively handle array fields, the destination connector is free to simply JSON-serialize the array back to a string when pushing data into the end platform. Destinations are free to choose the most convenient/reasonable representation for any given value. JSON serialization is just one possible strategy. Many SQL destinations will fall back to a native JSON type (e.g. Postgres' JSONB type, or Snowflake's VARIANT). For more details, you can refer to the [Airbyte documentation on supported data types](https://docs.airbyte.com/understanding-airbyte/supported-data-types) and the [beginner's guide to the AirbyteCatalog](https://docs.airbyte.com/understanding-airbyte/beginners-guide-to-catalog).Yoaquim Cintron
10/20/2023, 6:05 PMkapa.ai
10/20/2023, 6:07 PMkapa.ai
10/20/2023, 6:08 PMjson { "make": "alfa romeo", "model": "4C coupe", "powertrain_specs": { "horsepower": 247, "transmission": "6-speed" } } The normalized schema would create separate tables for the car and its powertrain specifications: sql CREATE TABLE "cars" ( "_airbyte_cars_hashid" VARCHAR, "_airbyte_emitted_at" TIMESTAMP_WITH_TIMEZONE, "_airbyte_normalized_at" TIMESTAMP_WITH_TIMEZONE, "make" VARCHAR, "model" VARCHAR ); CREATE TABLE "powertrain_specs" ( "_airbyte_powertrain_hashid" VARCHAR, "_airbyte_cars_foreign_hashid" VARCHAR, "_airbyte_emitted_at" TIMESTAMP_WITH_TIMEZONE, "_airbyte_normalized_at" TIMESTAMP_WITH_TIMEZONE, "horsepower" INTEGER, "transmission" VARCHAR ); In the case of naming collisions for un-nested objects, Basic Normalization chooses the expanded name following a specific naming scheme to avoid name collisions and ensure a more consistent naming scheme. However, with the introduction of Destinations V2, columns of Airbyte type Object in the Destination are no longer "unnested" into separate tables. Instead, they are kept as JSON objects within the main table. For more details, you can refer to the [Airbyte documentation on Basic Normalization](https://docs.airbyte.com/understanding-airbyte/basic-normalization).