Hi, I wonder why after overriding the catalog file...
# troubleshooting
s
Hi, I wonder why after overriding the catalog file in the tap configuration - for exmaple changing • the field ordering • the field type The schema returned by tap-adwords still using the original schema instead of the one that I've changed. Thus the data type of that column is not the type that I want to. Did I make anything wrong here?
Copy code
#meltano.yml
  - name: tap-adwords
    variant: meltano
    pip_url: git+<https://gitlab.com/meltano/tap-adwords.git>
    config:
      start_date: '2021-06-16T00:00:00Z'
      end_date: '2021-06-17T00:00:00Z'
      customer_ids: '00000000000'
    catalog: model/tap-adwords.json
Copy code
# model/tap-adwords.json
{
 "stream": "AD_PERFORMANCE_REPORT",
        "tap_stream_id": "AD_PERFORMANCE_REPORT",
        "metadata": [...],
        "schema": {
          "type": "object",
          "is_report": "true",
          "properties": {
            "callOnlyAdPhoneNumber": {
              "description": "Call-only ad phone number",
              "type": [
                "null",
                "string"
              ]
            },
            "activeViewMeasurableCost": {
              "description": "Active View measurable cost",
              "type": [
                "null",
                "number" #<========== Sai: Number here
              ]
            },
}
Logs:
Copy code
tap-adwords (out)     |  {"type": "SCHEMA", "stream": "KEYWORDS_PERFORMANCE_REPORT" ....
"activeViewMeasurableCost": 
{"description": "Active View measurable cost", 
"type": ["null", "integer", "string"]}  <========= Sai:It is not what I defined
.....}
v
guesssing you need to clear your catalog cache
s
Hi @visch, would you tell me how to do so? I can't find such a command on the CLI document page
v
Yeah there's two issues https://gitlab.com/meltano/meltano/-/issues/2627 and https://gitlab.com/meltano/meltano/-/issues/2850 Go to .meltano/run/tap-adwords , remove both of the files in there
s
Hi, thank you for your reply. Inside the run .meltano/run/ folder, I only got these folders
I was using this command to run the pipeline
meltano --log-level=debug elt tap-adrds target-postgres
. Didn't specific the job-id and have used
meltano install
after updating the catalog attribute in meltano.yml
v
My guess is very wrong
catalog: model/tap-adwords.json
means there's no caching or any of that
Ok another wild guess https://gitlab.com/meltano/tap-adwords/-/blob/master/tap_adwords/__init__.py#L1058 Looks like there's a specefic setup with properties
Are you passing in a properties file?
I don't know tap_adwords so if someone can pop in I'm just giving you some things to go on!
s
It isn't a properties file but a catalog file that was generated from this command:
meltano --log-level=debug elt tap-adwords target-postgres --dump=catalog > tap-adwords.json
after the
tap-adwords.json
had been generated, I modify it a bit to test if I can override the one that was generated by default
so after adding the below part to the tap
Copy code
schema:
      AD_PERFORMANCE_REPORT:
        activeviewavgcpm:
          type: ["null", "integer"]
it's still using a schema that I don't know where it refers to
Copy code
tap-adwords (out)     | {"type": "SCHEMA", "stream": "AD_PERFORMANCE_REPORT", "schema": {"type": "object", "is_report": "true", "properties": {"activeViewAvgCPM": {"description": "Active View avg. CPM", 
"type": ["integer", "string", "null"]}, 
....
v
Alright no one's hopped in yet. Debugging steps I'd take from here 1. Isolate the tap as that seems to be the issue here. Let's run only
meltano invoke tap-adwords
until we get the output you'd expect 2. If you run
meltano invoke --dump=catalog tap-adwords > tap-adwords.json
does that give you the output you're after? Or not? 3.
activeViewAvgCPM
isn't in https://gitlab.com/meltano/tap-adwords , so either it's getting changed slightly ( https://gitlab.com/meltano/tap-adwords/-/blob/master/tap_adwords/__init__.py#L926 touches that stream which tied with your error smells funny but could be nothing) , OR something else is changing it.
s
thank I think I know the path how to debug it!