Coder Social home page Coder Social logo

tableau-powershell-scripts's People

Contributors

glenrobinson72 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tableau-powershell-scripts's Issues

Unable to publish Data Source. :- Exception calling "UploadString" with "3" argument(s): "The remote server returned an error: (502) Bad Gateway."

Hi Glen,

Do you have an example of publishing a .hyper file, how should I call the TS-PublishDataSource ?
I got the following error when publishing .hyper on 2018.3

Unable to publish Data Source. Sample :- Exception calling "UploadString" with "3" argument(s): "The remote server returned an error: (502) Bad Gateway."

Here what I use:

TS-Signin -server $server -username $username -password $password -protocol https -siteID $SiteID

 $RetStatus = TS-PublishDataSource -ProjectName Testing -DataSourceName Sample -DataSourceFile Sample.hyper -DataSourcePath C:\Batch\Input -UserAccount user -Password Pwd -Embed False -oAuth False -OverWrite False

TS-Signout

Thanks,

Lian

TS-Signin

I can't get TS-Signin to work. The signin-body appears to be malformed. I tried replacing the quotes but still can't get this to work. Keep getting the "Unable to Sign-In to Tableau Server" message.

TS-PublishDatasource, Getting Exception calling "UploadString" with "3" argument(s): "The remote server returned an error: (500) Internal Server Error

Hi guys i hope you can help, im trying to use your publish datasource function and im getting the following error

Exception calling "UploadString" with "3" argument(s): "The remote server returned an error: (500) Internal Server Error

I connect to the server fine using the TS-Signin but then i get failure on publishing the datasource. The datasource file is a .tdsx that i had downloaded directly from our tableau server that im trying to publish back with a different datasource name for testing. Have not modified the file in anyway

I have googled the error and there seems to be other people having the same issue with uploadstring where it used to work before, however im unable to find a solution.

Any help would be much appreciated

Kind regards

Stewart

Error code on blank view export

Hey Glen, this has been extremely helpful to us. One issue I'm currently facing is when exporting an excel crosstab when the view is blank. I know we can't download the excel file but I would like to be able to capture the error code. Do you know the syntax for capturing the 6 digit error code indicating the view is empty? I have tried using $.Exception.Message and $.ScriptStackTrace but it doesn't provide an accurate return value.

Thank you,
Jon

TS-UpdateProjectPermissions Bug

There is a bug preventing changes to ViewDataSource permissions on TS-UpdateProjectPermissions.

If ($ViewDataSource -eq 'Allow' -or $ViewDataSource -eq 'Deny'){$DataSourceCapabilities += ' <capability name="Read" mode="' + $ViewWorkbook +'" />'}

Should be

If ($ViewDataSource -eq 'Allow' -or $ViewDataSource -eq 'Deny'){$DataSourceCapabilities += ' <capability name="Read" mode="' + $ViewDataSource +'" />'}

Ability to sign in with PAT - Personal Access Token

Your library is great, thanks, thanks, thanks. I wonder if you can modify your sign in function to use with PAT. As you may know, Tableau Online have changed to enforce MFA. And the old sign in would not work, and I love to have PAT authentication.

Thanks.

Diego

Can't get the TS-UpdateWorkbookPermissions to work

Hi Glen!

Thanks a lot for your work with the powershell scripts for Tableau. I am using your Backup and restore stuff and I'm now trying to get the updateWorkbookpermissions to work (I want the workbook to change permissions depending which subproject it is in)

There seems to be something wrong with the GetgroupDetails function since it does not seem to return a GroupID that I need to run the updateworkbookpermissions. Do you know how to troubleshoot further?

Many thanks!
/Mats

Unable to publish datasource

Getting this error while trying to publish a datasource or a workbook to tableau server

Unable to publish Data Source. test :- Exception calling "UploadString" with "3" argument(s): "The remote server returned an error: (400) Bad Request."

I am using the functions as specified in the helpfile. Any idea how to resolve this ?

Tableau REST API Helpfile

Hi Glen,

Many thanks for your PowerShell scripts for Tableau REST API.

By any chance, you will also be updating the helpfile to reflect on the newer 3.2 API script?

THanks

Nelson

TS-GetGroupDetails Assumptions

TS-GetGroupDetails requires Domain, or defaults to local. There are other functions which use TS-GetGroupDetails in order to carry out their tasks (IE: TS-UpdateProjectPermissions) but those functions don't take a domain input, so if your not using local groups these functions don't work properly.

Quick and dirty fix to utilize TS-QueryGroups for providing the domain:

function TS-GetGroupDetails
{
 param(
 [string[]] $Name = "",
 [string[]] $ID = "",
 [string[]] $Domain ="local"
 )
$response = Invoke-RestMethod -Uri ${protocol}://$server/api/$api_ver/sites/$siteID/groups -Headers $headers -Method Get

 foreach ($detail in $response.tsResponse.Groups.Group)
  { 
   if ($Name -eq $detail.name -and ($Domain -eq $detail.Domain.Name -or (ts-querygroups | where {$_.Name -eq $Name}).Domain -eq $detail.Domain.Name)){Return $detail.ID}

   if ($ID -eq $detail.ID){Return $detail.Name}
  }
}

Enhancement for multi-part upload

Hi Glen, I've found your module library exceedingly helpful in developing a suite of tools around Tableau Server for my IT team colleagues.
I want to return the (blind) favour by supplying you a copy of my modified code as I've actually made quite a few changes including two new functions which implement chunked file upload for workbooks and data sources. So if you are interested in rolling the essence of these changes into your library baseline, I'm more than happy for you to do this :)
Also note I've added a C# block to improve System.Net.Webclient handling, and in my new functions have added some sanitizing around XML payloads.
Tableau-REST.psm1.txt
Best regards, Gavin.

`Invoke-RestMethod : 'utf8' is not a supported encoding name.

Hi Glen,

When i run a script in powershel on the statement bellow I get an error.
Please advice. I'm not a super programmer in powershell. Maybe I do something wrong...
I need to get the tableau userid and the single method that I can use is the one bellow.

$response = Invoke-RestMethod -Uri $server/api/$api_ver/sites/$siteID/users?filter=name:eq:$username -Headers $headers -Method Get

`Invoke-RestMethod : 'utf8' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
Parameter name: name
At C:\Users\msso.admin\Documents\WindowsPowerShell\Scripts\change_users_password.ps1:33 char:14

  • $response = Invoke-RestMethod -Uri $server/api/$api_ver/sites/$siteID/users?fil ...
    
+ CategoryInfo          : NotSpecified: (:) [Invoke-RestMethod], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.