Hello All, I am developing a new tap-source using ...
# singer-tap-development
o
Hello All, I am developing a new tap-source using the cookie cutter. The auth is an API Key and I put the key in the Meltano.yml file. It is failing. Does anyone knows where do I have to put the key value or how is this implemented? client.py
Copy code
@property    
    def http_headers(self) -> dict:
        result = super().http_headers   
        #api_token = "123ABC"
        api_token = self.config.get("api_token") 
                
        auth = b64encode(f"{api_token}".encode()).decode()

        result["Authorization"] = f"Basic {auth}"  
    
        return result
meltano.yml
Copy code
config:
      api_token: 123ABC
      #start_date: '2010-01-01T00:00:00Z'
If a remove the commented linke in the client.py, it will connect without an issue.
e
Hi @oscar_gonzalez! How does the
settings
section look in
meltano.yml
? Custom taps like yours need to declare capabilities and settings like in the example here: https://meltano.com/docs/plugin-management.html#custom-plugins. Also, you can inspect the source of config values in Meltano with
meltano config <name-of-your-tap> list
o
I tried this as well with no luck
Copy code
settings:
    # TODO: To configure using Meltano, declare settings and their types here:
    - name: start_date
      value: '2010-01-01T00:00:00Z'
    - name: api_token
      value: "ABC123"
Copy code
bash: meltano: command not found
So...I know, dumb question. In order to use the config, do i need to install Meltano?
more over...when running Meltano I got this. I don't have a DB
Copy code
[2021-10-12 15:54:06,451] [13100|MainThread|root] [INFO] DB connection failed. Will retry after 5s. Attempt 1/3
e
by default (if you don't set a database URI) Meltano would try to create and use a sqlite db in
.meltano/meltano.db
at the root of your project
you can make sure the shell where Meltano is running has write access to
.meltano/
o
Thanks @edgar_ramirez_mondragon I will check it