Hello! encountering this log: ```Plugin configurat...
# troubleshooting
a
Hello! encountering this log:
Copy code
Plugin configuration is invalid
AttributeError: 'NoneType' object has no attribute 'get'
when I run this command:
Copy code
meltano config <some-name> test
with this yaml (this is an except from the extractor plugin that is erroneous):
Copy code
- config:
      dbname: postgres
      default_replication_method: INCREMENTAL
      host: valid_host
      password: valid_pass
      port: some_port
      user: valid_user
  inherit_from: valid_tap
  name: <some-name>
Any tips for what might be wrong would be greatly appreciated!
r
Probably something in the tap. What tap are you using? Running
meltano --log-level debug config <some-name> test
or
meltano invoke <some-name>
might give you some more context.
a
Hi, thanks for the response- I'm using tap-postgres, and got these additional logs from running invoke:
Copy code
state = incremental.sync_table(conn_config, stream, state, desired_columns, md_map)
  File "/home/ubuntu/Akkio/apps/meltano-service/integrations/meltano/.meltano/extractors/tap-postgres/venv/lib/python3.8/site-packages/tap_postgres/sync_strategies/incremental.py", line 61, in sync_table
    replication_key_sql_datatype = md_map.get(('properties', replication_key)).get('sql-datatype')
AttributeError: 'NoneType' object has no attribute 'get'
r
Looks related to this thread: https://meltano.slack.com/archives/C01TCRBBJD7/p1687251271489729?thread_ts=1687156773.783609&amp;cid=C01TCRBBJD7 @sebastian_slanitsch @edgar_ramirez_mondragon did you have any other thoughts on this?
Might help to share your
meltano.yml
too @albert_luo
a
the rest of my meltano file is not very interesting but I will share it anyways if it could help:
Copy code
default_environment: staging
environments:
- name: staging
- name: production
plugins:
  extractors:
  - name: tap-postgres
    pip_url: pipelinewise-tap-postgres
    variant: transferwise
...
{excerpt from above}
...
project_id: some_id
version: n
r
That doesn't look correct when I put it together... You have duplicate
name
keys (unless you were purposefully obfuscating it in your original excerpt) and it's inheriting from
valid_tap
, which isn't a plugin?
Copy code
plugins:
  extractors:
  - name: tap-postgres
    pip_url: pipelinewise-tap-postgres
    variant: transferwise
    config:
      dbname: postgres
      default_replication_method: INCREMENTAL
      host: valid_host
      password: valid_pass
      port: some_port
      user: valid_user
    inherit_from: valid_tap
    name: <some-name>
a
apologies for the miscommunication, it actually looks like:
Copy code
plugins:
  extractors:
  - name: tap-postgres
    pip_url: pipelinewise-tap-postgres
    variant: transferwise
  - config:
      dbname: postgres
      default_replication_method: INCREMENTAL
      host: valid_host
      password: valid_pass
      port: some_port
      user: valid_user
    inherit_from: tap-postgres
    name: <some-name>
u
There an extra
-
before the config key, so it's trying to parse an array
a
but that's a different extractor, the name is just at the bottom instead of the top
r
config
is an extractor?
a
the first is the base extractor and the second <some-name> inherits from tap-postgres with extra settings
e
I see, the order of keys was a bit confusing
r
Right, yeah. Same for me! 😅
a
haha sorry my bad guys
e
What I don't see is a metadata entry for the tap
a
Copy code
- config:
      dbname: postgres
      default_replication_method: INCREMENTAL
      host: valid_host
      password: valid_pass
      port: some_port
      user: valid_user
    inherit_from: tap-postgres
    name: <some-name>
    metadata:
      correct-entity-id:
        replication-key: field-name
        replication-method: INCREMENTAL
updated my yaml to include the metadata field, and still getting the same error when I run invoke:
Copy code
File "/home/ubuntu/Akkio/apps/meltano-service/integrations/meltano/.meltano/extractors/tap-postgres/venv/lib/python3.8/site-packages/tap_postgres/sync_strategies/incremental.py", line 61, in sync_table
    replication_key_sql_datatype = md_map.get(('properties', replication_key)).get('sql-datatype')
AttributeError: 'NoneType' object has no attribute 'get'
also, if it helps, this is the postgres table I am trying to extract:
Copy code
foo | time 
-----+------
  1 |  1
both fields are integers
e
how are you referencing that table in
metadata
?
a
the entity-id is the schema_name + "-" + table.name + ".*"
could the .* suffix be the issue?
u
yeah
a
got rid of the suffix, same error 😞
e
Ok, we can try discarding a selection issue. Can you add a select config?