Question about spec, discover and declare schema

Hi, I currently develop a custom tool for Google Admobs, and I’m a bit confusing about schema part.
There a quite long list questions but hope someone can help me out!

1. Question 1:
When declare schema of each stream. Does it need to be exactly the API reponse.
For example:

Here is Google Admobs API Response

[{
  "header": {
    "dateRange": {
      "startDate": {"year": 2018, "month": 9, "day": 1},
      "endDate": {"year": 2018, "month": 9, "day": 1}
    },
    "localizationSettings": {
      "currencyCode": "USD",
      "languageCode": "en-US"
    }
  }
},
{
  "row": {
    "dimensionValues": {
      "DATE": {"value": "20180918"},
      "APP": {
        "value": "ca-app-pub-8123415297019784~1001342552",
         displayLabel: "My app name!"
      }
    },
    "metricValues": {
      "ESTIMATED_EARNINGS": {"microsValue": 6500000}
    }
  }
},
{
  "footer": {"matchingRowCount": 1}
}]

Does my schema need to be like

 networkschema =  {
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": [],
  "properties": {
    "header": {
      "type": "object",
      "properties":{
        "dateRange": {
          "type": "object",
          "properties":{
            "startDate":{
              "type": "object",
              "properties":{
                "year": {"type": ["null", "number"]},
                "month": {"type": ["null", "number"]},
                "day": {"type": ["null", "number"]}
              } 
(and so on)

Or it just needs to be the output of fields in the format that I want?

"properties": {
    "DATE": {"type": ["null", "string"]},
    "APP": {"type": ["null", "string"]},
    "APP_NAME":{"type": ["null", "string"]},
    "ESTIMATED_EARNINGS":{"type": ["null", "number"]}
  }

2. Question 2
If the stream’s schema, which is the result of get_json_schema fuction, is different from source in term of number of fields, can airbyte still discover the stream
Because currently airbyte seems not to detect my stream, I will explain in question 3.

3. Question 3
I try to develop a custom report, in which users can input their wanted dimensions and metrics.
But airbyte cannot detect the stream of those custom report.

Therefore, I wonder:

  • If users don’t input anything in custom report dimension and metrics, do the config get like this
{
  "publisher_id":"abc",
  "client_id": "abc",
  "client_secret":"abc",
  "refresh_token": "abc",
  "start_date": "2022-10-25",
  "custom_report_dimensions": [],
  "custom_report_metrics": []
}

or like this

{
  "publisher_id":"abc",
  "client_id": "abc",
  "client_secret":"abc",
  "refresh_token": "abc",
  "start_date": "2022-10-25"
}

This question is for the code that I’m aiming

if "custom_report_metrics" in config:
            custom_streams = self.generate_custom_streams(authenticator=auth, config=config)
            streams.extend(custom_streams)

or

if config.get("custom_report_metrics"):
            custom_streams = self.generate_custom_streams(authenticator=auth, config=config)
            streams.extend(custom_streams)

and finally, I choose those custom report dimensions and metrics is array type with enum.

custom_report_metrics:
          title: Custom Reports Metrics
          description: Pick iteams in list
          type: array
          order: 2
          minItems: 0
          uniqueItems: true
          items:
            type: string
            enum:
              - AD_REQUESTS
              - MATCHED_REQUESTS
              - SHOW_RATE
              - MATCH_RATE
              - CLICKS
              - ESTIMATED_EARNINGS
              - IMPRESSIONS
              - IMPRESSION_CTR
              - IMPRESSION_RPM

With this spec config, do they return a list like

  "custom_report_dimensions": ["DATE"],
  "custom_report_metrics": ["CLICKS"]

or different format?

4. Question 4
What is the purpose of Advanced_auth or authSpecification?.
They help us to verify the format of authentication input by users?

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.
Best,
The Community Assistance Team