BI export: Wrike connection problems

Good morning, 

 

I am trying to use the "BI export" with Power Bi.

I have followed the following page instructions:

 

So, what i have done is:

Make a connector to the web "https://www.wrike.com/api/v4/data_export" with my token:

After transforming the response obtained, I get the following:

 

These URLs have the following format:

https://storage.www.wrike.com/data_export/resource/11025...8?accountId=5...6

 

Then, I try to connect (using a from web connector) to one of this URLs using an Authorization "bearer mytoken":

The problem is that I get an error message:

The message says...:

Not possible to connect

There was found an error while connecting.

Details: "The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all types of authentication: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type , If-Modified-Since, Prefer, Referer "

 

So... What am I doing wrong?

Appart from that, how could I change the real value of the URL (that is going to change every day) to the value of the following table, similar to a variable name? I will have one table for each URL:

 

Thank you very much for your help,

 

Marc

1
9 comments
Spot On Innovative Approach Stellar Advice
Avatar
Hugh

Hi Marc!

I've raised a Support Ticket for you, you should receive an email soon and our team will be able to help you with this.

If you have any other questions let me know! 😊

1
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Hugh, 

I have the same question as Marc. I got to the name of the table and the storage.www.wrike.com url (see below). How do I get to the columns and data behind the url? 

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Yasmeen Wilde I have the the Wrike data connected to Power BI but unfortunately my method doesn't allow for automatic refreshing of the data. Hopefully this can point you in the right direction though.

I started by getting the location of each of the Wrike CSV documents:

let
Source = Json.Document(Web.Contents("https://www.wrike.com/api/v4/data_export", [Headers=[Authorization="bearer token"]])),
data = Source[data],
data1 = data{0},
resources = data1[resources],
#"Converted to Table" = Table.FromList(resources, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"name", "url"}, {"Column1.name", "Column1.url"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",{{"Column1.url", "url"}}),
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Table from Link", each Csv.Document(Web.Contents([url], [Headers=[Authorization="bearer token"]]),[Delimiter=",", Columns=8, Encoding=1252, QuoteStyle=QuoteStyle.Csv]))
in
#"Added Custom"

Then I created a new query for each CSV link (Table from link):

let
Source = #"Wrike Data",
#"Table from Link" = Source{1}[Table from Link],
#"Promoted Headers" = Table.PromoteHeaders(#"Table from Link", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"audit_log_id", Int64.Type}, {"operator_user_id", Int64.Type}, {"audit_log_object_type", type text}, {"audit_log_object_id", Int64.Type}, {"audit_log_object_title", type text}, {"audit_log_operation_type", type text}, {"audit_log_operation_time", type datetime}, {"audit_log_operation_origin_location_country", type text}})
in
#"Changed Type"

4
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Seth Neds it works, thank you so much for sharing your code. 

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Yasmeen Wilde You're welcome! I'll glad you got it figured out.

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Seth Neds Thanks for the M query/Power query tip here, the second level of authorization by URL I'm still wrapping my mind around.  Elegant solution that should go into the Wrike documentation.

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Seth Neds I was able to get all of the queries to pull data from the links. Thank you!

 

Question- How do I get these queries to refresh? The queries aren't refreshing every hour/day. 

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Jacob Wright I apologize for this delayed response.

 

Question- How do I get these queries to refresh? The queries aren't refreshing every hour/day. 

From my original post:

"I have the the Wrike data connected to Power BI but unfortunately my method doesn't allow for automatic refreshing of the data."

Unfortunately this hasn't changed as far as I know.

 

If you are able to get the automatic refresh working, keep the following information from Wrike's documentation in mind: "BI Export data is automatically updated once a day. You can use API to check if new data is ready for export."

https://help.wrike.com/hc/en-us/articles/360019094414-BI-Export

0
Comment actions Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Jacob Wright  Let me also share with you what my solution was to this issue.

I setup the Wrike Backup Tool to download the BI Export daily. I then created an SSIS job that runs shortly thereafter and moves all the .csv files into an SQL Server database. I then create my Power BI reports using that data source and am able to successfully refresh every day on our report server.

I realize that this is not the most elegant solution but it works for us since we don't have a need for real-time data.

Hopefully this will help.

0
Comment actions Permalink

Folllowing List for Post: BI export: Wrike connection problems
[this list is visible for admins and agents only]

Didn’t find what you were looking for? Write new post