Snowflake normalization gives NULL tables when un-nesting JSON blobs

  • Is this your first time deploying Airbyte?: No / Yes
  • OS Version / Instance: MacOS
  • Memory / Disk: 32Gb / 1 Tb
  • Deployment: Docker
  • Airbyte Version: 0.39.41-alpha
  • Source name/version: Custom source for Aircall API
  • Destination name/version: Snowflake 0.4.35
  • Step: Sync - Normalization
  • Description:

Hi everybody! I have a question regarding the normalization process in Snowflake

I created a custom source to sync Calls from the Aircall API, I set the transformation mode to “Normalized tabular data” and the data is well sync and written in a Snowflake in a table named “_AIRBYTE_RAW_CALLS” (“calls” is the name of my stream) where every row has a JSON blob corresponding to one record from the API (see picture 1).

However, when the JSON blobs are trying to be un-nested the tables called “CALLS”, or “CALLS_CALLS” or “CALLS_CALLS_USER” (which are the names of the nested attributes in the JSON blob), the tables are either filled with NULL values (see picture 2), or are empty (see picture 3).

At first, I had JSON schema type errors that would make the normalization fail, but now they seem to be fixed and no longer appear, without any change in the Snowflake tables…

FYI, here is the way I parse the API response:

def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
        response_json = response.json()
        records = response_json.get("calls", [])
        yield from records

Picture 1:

Picture 2:

Picture 3:

Happy to have any help or information!!
Thanks in advance!

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
The Community Assistance Team

Hey could help with the logs of the sync? Also if possible share a record from _raw table


I found where the problem was…

The API sends, page per page, 20 values (named “calls”) + some “meta” information, with that format:
“calls”: a json with 20 values,
“meta”: some meta info
In the parse_response function, I asked Airbyte to consider only the 20 “calls” and not the meta
But didn’t change it in the json schema of the stream in the configured_catalog.json file…

So when normalizing on Snowflake, it would first wait for some data with a key named “calls” (and then some data with a key named “meta”), but couldn’t find anything since I asked Airbyte to consider only the value corresponding to the key “calls”, and not the key itself

Hence the CALLS table filled with Null values, and the empty CALLS_CALLS…

Got it. Can you create a github issue for this so that team can get a look into this?