Hi there! I have a question in particular with the...
# troubleshooting
j
Hi there! I have a question in particular with the tap-mssql extractor (BuzzCutNorman) I have two different database that I need to pull from that are both of type MSSQL. Example is I have one MSSQL database representing my companies core' information, and another minor secondary database that is also MSSQL based on kiosk revenue. Am I able to have different environment variables to point to the databases separately and then have two 'separate' base extractors? Pinging @BuzzCutNorman as well 🙂
✅ 1
My base extractor is really simple
Copy code
plugins:
  extractors:
  - name: tap-mssql
    variant: buzzcutnorman
    pip_url: git+<https://github.com/BuzzCutNorman/tap-mssql.git@v0.0.3>
    #use_cached_catalog: false
    config:
      dialect: mssql
      driver_type: pyodbc
      sqlalchemy_eng_params:
        fast_executemany: 'True'
      sqlalchemy_url_query:
        driver: ODBC Driver 18 for SQL Server
That then uses inhertience to grab what I need, then I have a set of env vars that populates our base connection properties
Copy code
# MSSQL
TAP_MSSQL_USER=''
TAP_MSSQL_PASSWORD='' 
TAP_MSSQL_DATABASE='XX'
TAP_MSSQL_HOST=''
TAP_MSSQL_PORT='1433' 
TAP_MSSQL_SQLALCHEMY_URL_QUERY_TRUSTSERVERCERTIFICATE='yes'
TAP_MSSQL_SQLALCHEMY_URL_QUERY_MULTISUBNETFAILOVER='yes'
can i "duplicate" the env vars with different names, then also duple my tap-mssql extractor and tell it which env vars to point to?
b
j
yup plugin inheritance was exactly the ticket 😛 ; just tested it. sorry for spamming!
Copy code
- name: tap-mssql-kiosk
    inherit_from: tap-mssql
    #use_cached_catalog: false
    config:
      user: ${TAP_MSSQL_KIOSK_USER} 
      password: ${TAP_MSSQL_KIOSK_PASSWORD} 
      database: ${TAP_MSSQL_KIOSK_DATABASE} 
      host: ${TAP_MSSQL_KIOSK_HOST}
b
No worries. Glad you found the solution already.🎉
meltano 3