Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Query Graphql with download tool

GloriousWater
8 - Asteroid

Hi. I'm trying to query Tableau's Graphql API through the download tool with the following payload.
It works (pic 1), and returns a list of workbooks. The problem arises when I want to add a filter to the query (pic2):

 

Pic(1):

GloriousWater_1-1664199913387.png

 

Pic(2):

GloriousWater_2-1664199964172.png

 

I cannot for the world figure out how to add the filters correctly. The query, with filter, runs fine directly in the Graphiql browser editor (pic3).

 

Pic(3):

GloriousWater_3-1664200055286.png

 

In Alteryx the query needs to be written as a json object.

Please help :p We are going nuts over this.

4 REPLIES 4
TableauDude4
5 - Atom

Similarly running into trouble with this - not sure why the filtering doesn't work!

apathetichell
18 - Pollux

i think the quotes around your luid throws off your json. I'd try swapping out single and double quotes to show clear separation between key value pairs in the query and the query itself.

TableauDude4
5 - Atom

Finally figured this out! The way the string is passed via JSON doesn't work with the double quotes. You need to add backslashes like the below example (which reads in a list of projects to call for).

 

'{
"query": "query workbookFields {workbooks(filter: {projectName:\"'+[ProjectName]+'\"}) {name,projectName,embeddedDatasources {fields {name,isHidden,__typename},upstreamTables {name,schema,database{id,name,luid,connectionType},upstreamDatabases{name}}}}}"
}'

bcnantg
5 - Atom

I was able to get this to work by using just the query part of the GraphQL syntax in the Formula tool and using the "Compose Query String/Body"..."And values from these fields" section in the Payload tab of the Download tool.

 

My formula looks like this...

 

bcnantg_3-1669924622105.png

 

and my Download tool (Payload tab) looks like this...

 

bcnantg_2-1669924543178.png

 

Only have Authorization in the Headers tab and https://api.monday.com/v2 as the url.

Labels