Hi,
When using kedro vs code extension,
I'm getting this unexpected error, despite the credentials being defined. and the dataset type is valid because the latest documentation asks for pandas.SQLQueryDataset and not pandas.SQLQueryDataSet"Dataset 'output' has an invalid type 'pandas.SQLQueryDataset'. "Unable to find credentials 'my_cred': check your data catalog and credentials configuration. See
https://kedro.readthedocs.io/en/stable/kedro.io.DataCatalog.html
for an example."Kedro LSP"
I've also defined "kedro.environment": "local"
in settings.json
Note that, the error only appears when I enable the extension, and no error when I disable the extension, and the pipelines work just fine.
Hi @Afiq Johari, thanks for flagging this. Can you share what your catalog entry looks like?
@Sajid Alam / @Jitendra Gundaniya have you seen something like this before?
When a catalog file is opened or modified, the extension will try to validate it by creating a test DataCatalog
instance, not sure exactly where it is going wrong, maybe the way the credentials is used. Would be great to see your catalog for more context.
@datajoely @Sajid Alam yes, essentially, the everything works well, it's just when I installed and enabled the kedro extension that this error is generated.
Another thing I like to add that there's this behavior. So somewhere at the bottom left of VS IDE, I see this 'base + local', and upon clicking, it prompts me 'Select Kedro runtime environment' at the top of VS. There's only one option to choose, 'local'. After selecting 'local' the errors on catalog.yml will be dismissed, but just a few seconds later, the same error will reappear.
Essentially, I can run kedro just fine, it's just that I like to try this extension and somehow it doesn't like my SQLQueryDataset
datasets, and unable to find credentials.
# below catalog.yml in conf\base output: type: pandas.SQLQueryDataset sql: " SELECT * FROM [NB].[prd].[Output] " credentials: my_cred
# below credentials.yml in conf\local my_cred: con: "mssql+pyodbc:///?odbc_connect=DRIVER={ODBC Driver 17 for SQL Server};SERVER=mydb.database.windows.net;PORT=1234;UID=uid;PWD=pwd"
If this helps, when I disable the extension, no errors are highlighted on catalog.yml
related to the SQLQueryDataset and credentials
This might be a bug in the extension's LSP validation process, I suspect its how it handles credentials during revalidation. I'll try to recreate it on my end and investigate.
For now, since your Kedro pipelines are working correctly without the extension, you can safely ignore these errors.
I'll update you once I've investigated further.
Oh, this is actually a known issue, #172, where the extension incorrectly reports credentials problems as "invalid type" errors, so you can safely ignore until it's fixed in an upcoming update.
@Sajid Alam sorry, I should have checked on that issue log first, thanks for confirming the issue π