`tap-jira` again (but maybe general question): I a...
# singer-taps
j
tap-jira
again (but maybe general question): I am regularly struggling with how to
select
streams/attributes(nested) with wild cards. Jira issues stream contains
fields
attribute, which contains a huge and nested structure, including hundreds of custom fields. I need to select just a small subset of nested fields, e.g.
assignee
. I tried many variants but nothing works, assignee is never persisted in target table (in Snowflake). I tested:
Copy code
select:
        - issues.fields.assignee*
        - issues.fields.assignee.*
I also tried to flatten attributes:
Copy code
config:
        flattening_enabled: 'True'
        flattening_max_depth: 1
and select:
Copy code
select:
        - issues.fields__assignee*
does not work. Any advice? Does this work the same in all taps or can a tap affect how this behaves?
e
@jan_soubusta Are these fields custom or are they known to the tap beforehand (i.e. discoverable)?
j
They are IMO discoverable. When I select
issues.*
, they are materialized to the target table. When I use the flattening, each custom field is a separate column, so the table is extremely wide, which does not help to performance, at least in some databases 😉 That and the fact that I don't want them at all are reasons why I would like to filter them out.
I also ran meltano select --list --all:
e
j
there are hundreds of them. Defining all of them in this way ... I don't want to do it 😉
From what you sent, I suppose that you still think that they are not discoverable and must be explicitly defined, am I right?
e
Right, gotcha. How about
Copy code
select:
        - issues.*
        - !issues.fields.*
        - issues.fields.assignee
        - issues.fields.assignee.*
?
j
I try it, thanks
e
Yeah, let me know if that works. Might be worth including the solution you find whenever https://github.com/meltano/meltano/issues/3024 gets done.
j
Does not work, custom fields are still reported.
Also, I made the page_size configurable and now default (10) is always used again, eh. It's very late Friday here in Prague, I am ending today and will continue later. Have a nice weekend! 😉
👍 1
e
You too!