Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Dobby1
Contributor III
Contributor III

Reading Tableau Metadata with Talend

I want to use Tableau's graphql to read metadata from our Tableau Online instance.

My Tableau graphql is:

query getWorkbooks {workbooks {id, name, projectName, projectVizportalUrlId}}

I've tested it on https://us-east-1.online.tableau.com/metadata/graphiql and I get back the expected results.

I also created a Personal Authentication Token on Tableau Online which I need to pass in the body of the

tRESTClient

and that's where I'm struggling. It can either be passed as an XML or JSON.

https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_auth.htm

The XML request body (message payload) using a Personal Access Token looks like the following example. The header of the request should contain either the key value pair 

Content-Type

 : 

text/xml

, or 

Content-Type

 : 

application/xml

.

<

tsRequest

>

<

credentials

personalAccessTokenName

=

"MY_TOKEN_NAME"

personalAccessTokenSecret

=

"qlE1g9MMh9vbrjjg==:rZTHhPpP2tUW1kfn4tjg8"

>

<

site

contentUrl

=

"MarketingTeam"

/>

</

credentials

>

</

tsRequest

>

The same request body using JSON looks like the following. Its header should contain 

Content-Type

 : 

application/json

.

{

"credentials"

: {

"personalAccessTokenName"

:

"MY_TOKEN_NAME"

,

"personalAccessTokenSecret"

:

"qlE1g9MMh9vbrjjg==:rZTHhPpP2tUW1kfn4tjg8"

,

"site"

: {

"contentUrl"

:

"MarketingTeam"

}

}

}

How would I construct the above in Talend and pass to the tRESTClient body?

Labels (5)
1 Reply
Anonymous
Not applicable

Hi

Take a look at tXMLMap component where you can build a Document as body and pass it to tRestClient, the job design looks like:

tFixeFlowInput--main--tXMLMap--out1-->tRestClient--main--tLogRow

 

Regards

Shong