RWS Community
RWS Community
  • Site

Trados Studio

Trados Team

Trados Accelerate

Trados Enterprise

Trados GroupShare

Trados Business Manager

Passolo

MultiTerm

RWS AppStore

Connectors

Beta Groups

Managed Translation

MultiTrans

TMS

Trados Enterprise

WorldServer

Language Weaver

Language Weaver Edge

Language Weaver Connectors

Language Weaver in Trados Studio

 

 

Tridion Docs

Tridion Sites

LiveContent S1000D

XPP

Trados Studio Ideas

Trados GroupShare Ideas

Trados Team Ideas

Trados Team Terminology Ideas

Trados Enterprise Ideas

Trados Business Manager Ideas

MultiTerm Ideas

Passolo Ideas

RWS Appstore Ideas

Tridion Docs Ideas

Tridion Sites Ideas

Language Weaver Ideas

Language Weaver Edge Ideas

Managed Translation - Enterprise Ideas

TMS Ideas

WorldServer Ideas

Trados Enterprise Ideas

LiveContent S1000D Ideas

Contenta S1000D

XPP Ideas

GroupShare Developers

Language Cloud Developers

MultiTerm Developers

Passolo Developers

Trados Studio Developers

Managed Translation Developers

TMS Developers

WorldServer Developers

Tridion Docs Developers

Language Combinations by Language Services

RWS Training & Certification

Style Guides

RWS Campus

Trados Approved Trainers

ETUG (European Trados User Group) Public Information

Nordic Tridion Docs User Group

Tridion West Coast User Group

RWS Community Internal Group

AURORA

Internal Trados Ideas

Linguistic Validation

Mercury

XPP Cloud

Recognition & Reward System

RWS Community Platform Related Questions

Events

RWS Training & Certification

To RWS Support

  • Search
  • Translate

    Detecting language please wait for.......


    Powered by
  • User
  • Site
  • Search
  • User
  • Products
  • Language Weaver Solutions
  • Language Weaver
  • More
  • Cancel
Language Weaver
  • Products
  • Language Weaver Solutions
  • Language Weaver
  • More
  • Cancel

Language Weaver > Wiki

Connecting Power BI to Language Weaver
  • Home
  • Blogs
  • Leaderboard
  • Forum
  • Videos
  • Wiki
  • Docs
  • More
  • Cancel
  • New
Show Translation Options

Detecting language please wait for.......


Powered by
Language Weaver requires membership for participation - click to join
  • +Wiki
  • Connect with Language Weaver Resources
  • Connecting Power BI to Language Weaver
  • How to report MT linguistic issues to RWS Support
  • How to use translation "Labels" in Language Weaver
  • How to use User Groups in Language Weaver
  • Language Weaver introduces Multilingual Content Insights
  • Real-time adaptation available in Language Weaver Translation UI

Connecting Power BI to Language Weaver

You can follow the steps below to connect Power BI to Language Weaver.

Full details on the Language Weaver API can be found in the Cloud API documentation.

1. Getting the connection details

You will need to have at hand the following information in order to establish the connection with Language Weaver.

  • <Account ID>: This is the account you will report on. To find out the Account ID, log into the Language Weaver portal (https://portal.languageweaver.com/) and click on [Username] > User Details.



  • <Client ID> and <Client Secret>: A Client ID and a Client Secret are the equivalent to a user and a password used to connect to Language Weaver via the API. If you need to create new ones, log into the Language Weaver portal (https://portal.languageweaver.com/) as an admin user and click on Settings > API Credentials. Then click on the + Create API Credentials button to create them.

2. Creating the tables in Power BI

Follow the steps below to create a table in Power BI for each query. In each case, replace <Account ID>, <Client ID> and <Client Secret> with the actual data.

  1. From Power BI, click on Home > Get data > Blank query.



  2. In the Power Query Editor, right click on the newly created query and then click on Advanced Editor.



  3. In the Advanced Editor, delete the default code and paste the code from the samples below (section 3. Sample queries). Make sure you replace the <placeholder> tags with the actual data.
  4. Click on Done.
  5. Click on Edit Credentials if you are asked to specify how to connect.



  6. Go to the Anonymous tab and click on Connect. A new table will be created with the results of the query. You can remove or reorder columns as needed.



  7. Right click on the query and then click on Rename to assign a proper name to the query.



  8. Repeat the previous steps for each of the reporting queries you wish to run.

3. Sample queries

Use the sample code below to create reporting queries via Power BI.

Remember to replace the following placeholder tags with the actual data:

  • <Client ID>
  • <Client Secret>
  • <Account ID>
  • <Start date>
    Format: yyyy/MM/dd
    Example: For 30 June 2022, use 2022/06/30
  • <End date>
    Format: yyyy/MM/dd
    Example: For 10 April 2022, use 2022/04/10

Applications

let

/* Authentication */
authenticationURL = "https://api.languageweaver.com/v4/token",
authPostData = Json.FromValue([clientId = "<Client ID>", clientSecret = "<Client Secret>"]), /* Replace with your Client ID and Client Secret */
headersAuth = [#"Content-Type"="application/json"],
authResponse = Web.Contents(
authenticationURL,
[
Headers = headersAuth,
Content = authPostData
]
),
authResponseJson = Json.Document(authResponse),
token = "Bearer " & authResponseJson[#"accessToken"],

/* Call */
url = "https://api.languageweaver.com/v4/accounts/<Account ID>/reports/usage/translations", /* Replace with your account ID number */
headers = [#"Authorization"= token, #"Content-Type"="application/json"],
postData = Json.FromValue([startDate = "<Start date>", endDate = "<End date>", applicationIds = {"all"}]), /* Change the dates as necessary */

response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),

/* Response */
#"Converted to Table" = Table.FromRecords({jsonResponse}),
#"Expanded reports1" = Table.ExpandListColumn(#"Converted to Table", "report"),
#"Expanded reports2" = Table.ExpandRecordColumn(#"Expanded reports1", "report", {"reportYear", "reportMonth", "application", "count", "inputWordCount", "inputCharCount", "outputWordCount", "outputCharCount"}),
#"Expanded reports3" = Table.ExpandRecordColumn(#"Expanded reports2", "application", {"id", "name"})

in
#"Expanded reports3"

Groups

let

/* Authentication */
authenticationURL = "https://api.languageweaver.com/v4/token",
authPostData = Json.FromValue([clientId = "<Client ID>", clientSecret = "<Client Secret>"]), /* Replace with your Client ID and Client Secret */
headersAuth = [#"Content-Type"="application/json"],
authResponse = Web.Contents(
authenticationURL,
[
Headers = headersAuth,
Content = authPostData
]
),
authResponseJson = Json.Document(authResponse),
token = "Bearer " & authResponseJson[#"accessToken"],

/* Call */
url = "https://api.languageweaver.com/v4/accounts/<Account ID>/reports/usage/translations", /* Replace with your account ID number */
headers = [#"Authorization"= token, #"Content-Type"="application/json"],
postData = Json.FromValue([startDate = "<Start date>", endDate = "<End date>", groupIds = {"all"}]), /* Change the dates as necessary */

response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),

/* Response */
#"Converted to Table" = Table.FromRecords({jsonResponse}),
#"Expanded reports1" = Table.ExpandListColumn(#"Converted to Table", "report"),
#"Expanded reports2" = Table.ExpandRecordColumn(#"Expanded reports1", "report", {"reportYear", "reportMonth", "group", "count", "inputWordCount", "inputCharCount", "outputWordCount", "outputCharCount"}),
#"Expanded reports3" = Table.ExpandRecordColumn(#"Expanded reports2", "group", {"id", "value"})

in
#"Expanded reports3"

Labels

let

/* Authentication */
authenticationURL = "https://api.languageweaver.com/v4/token",
authPostData = Json.FromValue([clientId = "<Client ID>", clientSecret = "<Client Secret>"]), /* Replace with your Client ID and Client Secret */
headersAuth = [#"Content-Type"="application/json"],
authResponse = Web.Contents(
authenticationURL,
[
Headers = headersAuth,
Content = authPostData
]
),
authResponseJson = Json.Document(authResponse),
token = "Bearer " & authResponseJson[#"accessToken"],

/* Call */
url = "https://api.languageweaver.com/v4/accounts/<Account ID>/reports/usage/translations", /* Replace with your account ID number */
headers = [#"Authorization"= token, #"Content-Type"="application/json"],
postData = Json.FromValue([startDate = "<Start date>", endDate = "<End date>", labelIds = {"all"}]), /* Change the dates as necessary */

response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),

/* Response */
#"Converted to Table" = Table.FromRecords({jsonResponse}),
#"Expanded reports1" = Table.ExpandListColumn(#"Converted to Table", "report"),
#"Expanded reports2" = Table.ExpandRecordColumn(#"Expanded reports1", "report", {"reportYear", "reportMonth", "label", "count", "inputWordCount", "inputCharCount", "outputWordCount", "outputCharCount"}),
#"Expanded reports3" = Table.ExpandRecordColumn(#"Expanded reports2", "label", {"id", "value"})

in
#"Expanded reports3"

Language Pairs

let

/* Authentication */
authenticationURL = "https://api.languageweaver.com/v4/token",
authPostData = Json.FromValue([clientId = "<Client ID>", clientSecret = "<Client Secret>"]), /* Replace with your Client ID and Client Secret */
headersAuth = [#"Content-Type"="application/json"],
authResponse = Web.Contents(
authenticationURL,
[
Headers = headersAuth,
Content = authPostData
]
),
authResponseJson = Json.Document(authResponse),
token = "Bearer " & authResponseJson[#"accessToken"],

/* Call */
url = "https://api.languageweaver.com/v4/accounts/<Account ID>/reports/usage/translations", /* Replace with your account ID number */
headers = [#"Authorization"= token, #"Content-Type"="application/json"],
postData = Json.FromValue([startDate = "<Start date>", endDate = "<End date>", languagePairIds = {"all"}]), /* Change the dates as necessary */

response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),

/* Response */
#"Converted to Table" = Table.FromRecords({jsonResponse}),
#"Expanded reports1" = Table.ExpandListColumn(#"Converted to Table", "report"),
#"Expanded reports2" = Table.ExpandRecordColumn(#"Expanded reports1", "report", {"reportYear", "reportMonth", "languagePair", "count", "inputWordCount", "inputCharCount", "outputWordCount", "outputCharCount"}),
#"Expanded reports3" = Table.ExpandRecordColumn(#"Expanded reports2", "languagePair", {"name", "displayName", "sourceLanguageId", "targetLanguageId"})

in
#"Expanded reports3"

Users

let

/* Authentication */
authenticationURL = "https://api.languageweaver.com/v4/token",
authPostData = Json.FromValue([clientId = "<Client ID>", clientSecret = "<Client Secret>"]), /* Replace with your Client ID and Client Secret */
headersAuth = [#"Content-Type"="application/json"],
authResponse = Web.Contents(
authenticationURL,
[
Headers = headersAuth,
Content = authPostData
]
),
authResponseJson = Json.Document(authResponse),
token = "Bearer " & authResponseJson[#"accessToken"],

/* Call */
url = "https://api.languageweaver.com/v4/accounts/<Account ID>/reports/usage/translations", /* Replace with your account ID number */
headers = [#"Authorization"= token, #"Content-Type"="application/json"],
postData = Json.FromValue([startDate = "<Start date>", endDate = "<End date>", userIds = {"all"}]), /* Change the dates as necessary */

response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),

/* Response */
#"Converted to Table" = Table.FromRecords({jsonResponse}),
#"Expanded reports1" = Table.ExpandListColumn(#"Converted to Table", "report"),
#"Expanded reports2" = Table.ExpandRecordColumn(#"Expanded reports1", "report", {"reportYear", "reportMonth", "user", "count", "inputWordCount", "inputCharCount", "outputWordCount", "outputCharCount"}),
#"Expanded reports3" = Table.ExpandRecordColumn(#"Expanded reports2", "user", {"userId", "firstName", "middleName", "lastName", "email"})

in
#"Expanded reports3"

Client IDs

let

/* Authentication */
authenticationURL = "https://api.languageweaver.com/v4/token",
authPostData = Json.FromValue([clientId = "<Client ID>", clientSecret = "<Client Secret>"]), /* Replace with your Client ID and Client Secret */
headersAuth = [#"Content-Type"="application/json"],
authResponse = Web.Contents(
authenticationURL,
[
Headers = headersAuth,
Content = authPostData
]
),
authResponseJson = Json.Document(authResponse),
token = "Bearer " & authResponseJson[#"accessToken"],

/* Call */
url = "https://api.languageweaver.com/v4/accounts/<Account ID>/reports/usage/translations", /* Replace YourAccountID with the real account ID number */
headers = [#"Authorization"= token, #"Content-Type"="application/json"],
postData = Json.FromValue([startDate = "<Start date>", endDate = "<End date>", clientIds = {"all"}]), /* Change the dates as necessary */

response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),

/* Response */
#"Converted to Table" = Table.FromRecords({jsonResponse}),
#"Expanded reports1" = Table.ExpandListColumn(#"Converted to Table", "report"),
#"Expanded reports2" = Table.ExpandRecordColumn(#"Expanded reports1", "report", {"reportYear", "reportMonth", "client", "count", "inputWordCount", "inputCharCount", "outputWordCount", "outputCharCount"}),
#"Expanded reports3" = Table.ExpandRecordColumn(#"Expanded reports2", "client", {"name", "clientId"})


in
#"Expanded reports3"

  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Our Terms of Use
  • Copyright
  • Privacy
  • Security
  • Anti-slavery Statement
  • Cookie Notice
  • YouTube