Constantino Schillebeeckx
09/13/2021, 10:14 PMprefect.client.client.Client.get
? For reference, I'm trying to hit he following without success:
[2021-01-14 16:00:00.000] ERROR --- 400 Client Error: Bad Request for url: <https://api.prefect.io/flows?name=dbt_test>
Traceback (most recent call last):
File "deploy/register_flows.py", line 491, in <module>
main()
File "deploy/register_flows.py", line 485, in main
create_proj_and_register_flows(flows, args)
File "deploy/register_flows.py", line 278, in create_proj_and_register_flows
register_flow(flow, flow_file, args)
File "deploy/register_flows.py", line 314, in register_flow
flow_already_registered(flow.name)
File "deploy/register_flows.py", line 319, in flow_already_registered
resp = CLIENT.get('flows', params={"name": flow_name})
File "/Users/constantino.schillebeekx/.pyenv/versions/dwh/lib/python3.8/site-packages/prefect/client/client.py", line 406, in get
response = self._request(
File "/Users/constantino.schillebeekx/.pyenv/versions/dwh/lib/python3.8/site-packages/prefect/client/client.py", line 710, in _request
response = self._send_request(
File "/Users/constantino.schillebeekx/.pyenv/versions/dwh/lib/python3.8/site-packages/prefect/client/client.py", line 620, in _send_request
response.raise_for_status()
File "/Users/constantino.schillebeekx/.pyenv/versions/dwh/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: <https://api.prefect.io/flows?name=dbt_test>
Kevin Kho
client.graphql()
or the other methods ont he ClientChris White
query = """query{flow(where: {name: {_eq: "dbt_test"}}){name id ...}}""" # list other attributes you are looking for here
client.graphql(query)