Matatika / tap-google-sheets

tap-google-sheets, singer tap built with the Meltano SDK
GNU Affero General Public License v3.0
2 stars 9 forks source link

Renaming output/stream #11

Closed srpwnd closed 7 months ago

srpwnd commented 7 months ago

I wanted to rename my output stream (using env var). In docs on Meltano Hub it says to use TAP_GOOGLE_SHEETS_OUTPUT_NAME. In your README here it says to use TAP_GOOGLE_SHEETS_STREAM_NAME.

I went to check the code and saw that the code expects config to have property output_name but then tries to read config for key stream_name which does not exist. Am I missing something?

I can make a PR to adjust this if it is welcome.

ReubenFrankel commented 7 months ago

Hi @srpwnd, thanks for opening this issue. Looks like a bug to me - happy to accept a PR!

In the meantime, since this tap was built with the Meltano SDK you should be able to use stream_maps to alias a stream:

plugins:
  extractors:
  - name: tap-google-sheets
    variant: matatika
    pip_url: git+https://github.com/Matatika/tap-google-sheets.git
    config:
      stream_maps:
        example_sheet:  # sheet name (spaces replaced with underscores)
          __alias__: example_stream  # stream name