Does anyone know why using glob in `stream_maps` o...
# best-practices
e
Does anyone know why using glob in
stream_maps
overrides the configuration in
select
?
e
Hi @Ellis Valentiner! Can you say more about this? Are you seeing streams that should be selected are not, or viceversa?
e
We have single tenant databases that are our sources, so we add a
customer_id
column to each table when we replicate it. Currently we list each table in both the
select
and again in the
stream_maps
where we have a simple
customer_id: int("${CUSTOMER_ID}")
. Example:
Copy code
stream_maps:
          table_one:
            customer_id: int("${CUSTOMER_ID}")
          table_two:
            customer_id: int("${CUSTOMER_ID}")
            some_other_field: 1
We would like to use glob to reduce the redundancy. Like this:
Copy code
stream_maps:
          '*':
            customer_id: int("${CUSTOMER_ID}")
          table_two:
            some_other_field: 1
However when we do this then Meltano tries to replicate other tables that are not included in our
select
.
For example our select config is just like:
Copy code
select:
        - table_one.*
        - table_two.*
but when we use the
*
in
stream_maps
then we start to also replicate other tables (e.g.
table_three
)
I also haven't been able to find anything in the docs that describe this behavior.