-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use table_name if different from tap_stream_id #25
base: master
Are you sure you want to change the base?
Use table_name if different from tap_stream_id #25
Conversation
Manual tests, as described above, have passed. This is ready for review. |
So this will use table_name if available, then fall back to tap_stream_id? Makes sense to me, and if the names come from dynamo DB with hyphens, and the target is a database like postgres, this change would be necessary |
Indeed! Yes, if table_name is available, that's what dynamo will connect to; otherwise, it will use the |
UPDATE: I found that the tap was still emitting SCHEMA and RECORD messages with the upstream table_name, which led me to an additional set of updates (here: fbe88a4) which declare both Log:
For the above example, the catalog has been modified such that |
Id love to see this pushed up, because with my case I have issues where my targets having issues, seemingly attributed to a dynamo table name being extremely long |
Description of change
According to the Singer spec here, I believe the tap is supposed to use the stream's
table_name
field, if provided, to specify the source table. This is important so that a user who is customizing the stream catalog can redirect a given table to another downstream stream ID or table name.(In our case, this is necessary due to special characters ('-') in the DynamoDB table name, which we do not want to have replicated to the downstream database's table name.)
Essentially, we just replace
table_name = stream['tap_stream_id']
withtable_name = stream.get('table_name', stream['tap_stream_id'])
. This doesn't have any effect if using the default/discovered catalog, but if the user overwrites these values in the catalog,, it can provide separation of upstream table name and downstream stream ID / table name.Manual QA steps
pipx install git+https://github.com/aaronsteers/tap-dynamodb@feature/configurable-table-name
stream
andtap_stream_id
properties and leavetable_name
as is.stream
, which is now distinct fromtable_name
.Risks
table_name
without expecting this behavior.Rollback steps