# questions

Sneha Kumari

09/14/2023, 5:36 AM
Hello Team, I am running a kedro registry from argo workflows. Everything runs fine when I run the end to end pipeline locally but throws an error about not being able to find db_credentials. I have the db_credentials set in the credentials.yml file. ANy idea what may be the issue. Thanks Error:
Copy code
Traceback (most recent call last):
  File "/usr/local/bin/kedro", line 8, in <module>
  File "/usr/local/lib/python3.8/site-packages/kedro/framework/cli/", line 211
, in main
  File "/usr/local/lib/python3.8/site-packages/click/", line 1157, in __call_
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kedro/framework/cli/", line 139
, in main
  File "/usr/local/lib/python3.8/site-packages/click/", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kedro/framework/cli/", line

  File "/usr/local/lib/python3.8/site-packages/kedro/framework/cli/", line
 455, in run
  File "/usr/local/lib/python3.8/site-packages/kedro/framework/session/",
line 408, in run
    catalog = context._get_catalog(
  File "/usr/local/lib/python3.8/site-packages/kedro/framework/context/",
line 287, in _get_catalog
    catalog = settings.DATA_CATALOG_CLASS.from_config(
  File "/usr/local/lib/python3.8/site-packages/kedro/io/", line 276,
in from_config
    ds_config = _resolve_credentials(ds_config, credentials)
  File "/usr/local/lib/python3.8/site-packages/kedro/io/", line 80, i
n _resolve_credentials
    return {k: _map_value(k, v) for k, v in config.items()}
  File "/usr/local/lib/python3.8/site-packages/kedro/io/", line 80, i
n <dictcomp>
    return {k: _map_value(k, v) for k, v in config.items()}
  File "/usr/local/lib/python3.8/site-packages/kedro/io/", line 75, i
n _map_value
    return _get_credentials(value, credentials)
  File "/usr/local/lib/python3.8/site-packages/kedro/io/", line 50, i
n _get_credentials
    raise KeyError(
KeyError: "Unable to find credentials 'db_credentials': check your data catalog and
credentials configuration. See <>
atalog.html for an example."
time="2023-09-13T22:22:02.000Z" level=info msg="sub-process exited" argo=true error=
Error: exit status 1
The catalog looks like this:
Copy code
_sqds: &sqds
  type: pandas.SQLQueryDataSet

  <<: *sqds
  sql: "<query>"
  credentials: db_credentials
And the credentials.yml file:
Copy code
  con: ${PG_URL}

Chandan Malla

09/14/2023, 6:15 AM
Quick question: How are you passing the arguments? Sqds and query ?
I don't know about argo workflows, but I guess credentials.yml are in .gitignore and they are not pushed to git.

Nok Lam Chan

09/14/2023, 11:28 AM
And credentials shouldn’t be push to git - better to use environment variable. With OmegaconfigLoader you can use
${os.env: x}
to get env variable easily.

Sneha Kumari

09/14/2023, 5:12 PM
@Sonya Norris