Nicolas Gaillard
10/20/2021, 3:51 PMDbtRpcClient
and everything looks fine when I want to run or test models but when I want to run the dbt ls
command, I can't get the result on the Dagster side and I have no error on the RPC server :
{'error': {'code': -32000, 'message': 'Server error', 'data': {'type': 'InternalException', 'args': ['No matching handler found for rpc method None (which=list)'], 'message': 'No matching handler found for rpc method None (which=list)'}}, 'id': '38ac7b10-31bb-11ec-a63a-0242ac120004', 'jsonrpc': '2.0'}
I don't understand, the command is normally supported on DBT since if I put a wrong command, I get the following message:
{'error': {'code': -32602, 'message': 'Invalid params', 'data': {'type': 'TypeError', 'args': ["dbt: error: invalid choice: 'foo' (choose from 'docs', 'source', 'init', 'clean', 'debug', 'deps', 'list', 'ls', 'build', 'snapshot', 'rpc', 'run', 'compile', 'parse', 'test', 'seed', 'run-operation')\n"], 'message': "dbt: error: invalid choice: 'foo' (choose from 'docs', 'source', 'init', 'clean', 'debug', 'deps', 'list', 'ls', 'build', 'snapshot', 'rpc', 'run', 'compile', 'parse', 'test', 'seed', 'run-operation')\n"}}, 'id': '79795a54-31bc-11ec-9a83-0242ac120004', 'jsonrpc': '2.0'}
I use this block of code to run DBT ls :
dbt_rpc_client = DbtRpcClient()
ls_command = "ls"
out = dbt_rpc_client .cli(command=ls_command, task_tags={})
I tried to upgrade DBT and nothing happens. All other commands work.
Has anyone had this problem? Thank you in advance and have a nice day!owen
10/20/2021, 4:38 PMdbt
side of things. Even directly sending http requests to the rpc server yields the same response. I think the functionality to be able to run dbt ls commands over rpc is actually somewhat new, so it may be possible that this is just a genuine bug.Nicolas Gaillard
10/20/2021, 4:57 PMlocalhost:8580/jsonrpc
:
{
"jsonrpc": "2.0",
"method": "list",
"id": "",
"params": {
"resource_types": [
"snapshot"
]
}
}
owen
10/21/2021, 4:06 PMNicolas Gaillard
10/22/2021, 11:02 AMowen
10/22/2021, 3:05 PM