CLIの例: カタログ・テキストの検索および置換
カタログ・マネージャ・コマンドライン・インタフェースを使用して、カタログ・オブジェクトのテキストをプログラム的に検索および置換できます。 たとえば、カタログ内のフォルダ、ファイル、ワークブックおよびその他のオブジェクトの名前を変更するスクリプトを記述できます。
テキストを検索して置換する構文
runcat.sh -cmd replace -online <Oracle Analytics Cloud URL>
-folder <root folder to start find>
textreplace -old "<string to replace> -new "<new string>"
-credentials <file with login username and password>
例
この例では、カタログ・フォルダの名前を「収益」という名前に変更します。 新しいフォルダ名は営業レポートです:
runcat.sh -cmd replace -online "https:/myoac.ocp.oraclecloud.com/analytics-ws" -folder "/Shared/North America" textreplace -old "/Shared/North America/Revenue" -new "/Shared/North America/Sales Reports" -credentials /scratch/mycredentials.txt
資格証明ファイルには、次の行が含まれます:
login=<userid>
pwd=<password>