Hi All, As per attached screenshot while creating...
# ask-community-for-troubleshooting
r
Hi All, As per attached screenshot while creating s3 destination, we have two options for normalization. 1.No flattering 2.Root level Normalization As per the example given in screenshot for root level normalization, it creates columns for root level field eg. user_Id, name. But what if we want to normalize nested fields as well in this example name column has a json data, which contains "first","last". How can we create columns as "name.first" and "name.last" in destination. How this transformation we can achieve using airbyte? Can someone please help on this. @Karen (Airbyte) @Marcos Marx (Airbyte) @Siddhant Singh @Jerri Comeau (Airbyte) @John Wasserman
n
Hi Rahul, have you looked at this part of the normalization docs? I think this might help: https://airbytehq.github.io/understanding-airbyte/basic-normalization/#objects
r
Hi @Nataly Merezhuk (Airbyte), yes I have gone through it. But it is not helping me with above use case.
n
So you've tried something like this? It should expand the nested object into separate tables.
Copy code
CREATE TABLE "users" (
    "_airbyte_users_hashid" VARCHAR,
    "_airbyte_emitted_at" TIMESTAMP_WITH_TIMEZONE,
    "_airbyte_normalized_at" TIMESTAMP_WITH_TIMEZONE,

    "user_id" INT
);

CREATE TABLE "user_specs" (
    "_airbyte_user_hashid" VARCHAR,
    "_airbyte_users_foreign_hashid" VARCHAR,
    "_airbyte_emitted_at" TIMESTAMP_WITH_TIMEZONE,
    "_airbyte_normalized_at" TIMESTAMP_WITH_TIMEZONE,

    "first" VARCHAR,
    "last" VARCHAR
);