go.temporal.io/server@v1.23.0/common/archiver/gcloud/README.md (about) 1 # Google Storage blobstore 2 ## Configuration 3 See https://cloud.google.com/docs/authentication#service-accounts to understand how is made the authentication against google cloud storage 4 5 Nowdays we support three different ways in order to let Temporal know where your google keyfile credentials are located 6 7 * Temporal archival deployment.yaml configuration file 8 * `GOOGLE_APPLICATION_CREDENTIALS` environment variable 9 * Google default credentials location 10 11 If more than one credentials location is given, then Temporal will resolve the conflicts by the following priority: 12 13 `GOOGLE_APPLICATION_CREDENTIALS > Temporal archival deployment.yaml > Google default credentials` 14 15 Be sure that you have created your bucket first, and have enought rights in order to read/write over your bucket. 16 17 ### Gcloud Archival example 18 19 Enabling archival is done by using the configuration below. `credentialsPath` is required but could be empty "" in order to allow a Google default credentials. 20 21 ``` 22 archival: 23 history: 24 state: "enabled" 25 enableRead: true 26 provider: 27 gstorage: 28 credentialsPath: "/tmp/keyfile.json" 29 visibility: 30 state: "enabled" 31 enableRead: true 32 provider: 33 gstorage: 34 credentialsPath: "/tmp/keyfile.json" 35 36 namespaceDefaults: 37 archival: 38 history: 39 state: "enabled" 40 URI: "gs://my-bucket-cad/temporal_archival/development" 41 visibility: 42 state: "enabled" 43 URI: "gs://my-bucket-cad/temporal_archival/visibility" 44 ``` 45 46 ## Visibility query syntax 47 You can query the visibility store by using the `tctl workflow listarchived` command 48 49 The syntax for the query is based on SQL 50 51 Supported column names are 52 - WorkflowType *String* 53 - WorkflowID *String* 54 - StartTime *Date* 55 - CloseTime *Date* 56 - SearchPrecision *String - Day, Hour, Minute, Second* 57 58 One of these fields are required, StartTime or CloseTime and they are mutually exclusive and also SearchPrecision. 59 60 Searching for a record will be done in times in the UTC timezone 61 62 SearchPrecision specifies what range you want to search for records. If you use `SearchPrecision = 'Day'` 63 it will search all records starting from `2020-01-21T00:00:00Z` to `2020-01-21T59:59:59Z` 64 65 ### Limitations 66 67 - The only operator supported is `=` 68 - Currently It's not possible to guarantee the resulSet order, specially if the pageSize it's fullfilled. 69 70 ### Example 71 72 *Searches the first 20 records for a given day 2020-01-21* 73 74 `./tctl --ns samples-namespace workflow listarchived -ps="20" -q "StartTime = '2020-01-21T00:00:00Z' AND SearchPrecision='Day'"` 75 76 ## Archival query syntax 77 78 Once you have a workflowId and a runId you can retrieve your workflow history. 79 80 example: 81 82 `./tctl --ns samples-namespace workflow show -w workflow-id -r runId`