tabcmd.exe ユーティリティを実行して、ビューを Tableau Server に公開したいと考えています。これを行うための手動の手順は次のとおりです。ログ ファイルは、その場所の手順ごとに更新されます。
"C:\Users[ユーザー名]\AppData\Roaming\Tableau\tabcmd.log"
同じセッションで、この手順を 1 つずつ手動で実行する必要があります
- cmd.exe を実行します。
- コマンドtabcmd login -s "http:/sales-server:8000" -t Sales -u administrator -pp@ssw0rd!を使用してログインします。
- コマンドtabcmd createproject -n "Quarterly_Reports" -d "Workbooks show Quarterly sales reports"を使用してプロジェクト名を作成します。
- コマンドtabcmd publish "analysis.twbx" -n "Sales_Analysis" --db-user "jsmith" --db-password "p@ssw0rd"を使用してビューを公開します。
- コマンドtabcmd refreshextracts --workbook "My Workbook"を使用して更新します
- コマンドtabcmd logoutを使用してログアウトします。
現在、.Net win フォームからこの手順を自動化しようとしているため、以下のコードを試してみましたが、機能していません。
String path = @"C:\Program Files (x86)\Tableau\Tableau Server\7.0\bin\tabcmd.exe"
ProcessStartInfo startInfo = new ProcessStartInfo ();
startInfo.FileName = "\""+path+ "\"";
startInfo.Arguments = String.Format("login -s http://Server1:8000 --db-user "jsmith" --db-password "p@ssw0rd");
startInfo.UseShellExecute = false ;
startInfo.CreateNoWindow = false;
startInfo.WindowStyle = ProcessWindowStyle.Normal;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardError = true;
Process p = new Process();
p.StartInfo = startInfo;
p.Start();
using (StreamWriter sw = p.StandardInput)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("createproject -n \"MyProject\" -d \"MyProjectWorkbook\"");
//sw.WriteLine("My next Command");
//sw.WriteLine("My next Command");
}
}
正常にログインできましたが、次の手順に進むことができません。これをさらに進める方法がわかりません。そのため、これに関するヘルプを楽しみにしています。前もって感謝します!