vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Fail over to the replica volume from the SLCLI 

Use the following command to fail a file volume over to a specific replicant volume.

 slcli file disaster-recovery-failover --help
sage: slcli file disaster-recovery-failover [OPTIONS] VOLUME_ID

Options:
--replicant-id TEXT ID of the replicant volume
-h, --help Show this message and exit.





 Fail over to the replica volume with the API 



 REST API 



* URL - https://USERNAME:APIKEY@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/primaryvolumeId/disasterRecoveryFailoverToReplicant
* Request body



{
"parameters": [replicavolumeid]
}





 SOAP API 



* URL - https://api.softlayer.com/soap/v3/SoftLayer_Network_Storage
* Request body

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3.1/">
<SOAP-ENV:Header>
<ns1:authenticate>
<username>USERNAME</username>
<apiKey>APIKEY</apiKey>
</ns1:authenticate>
<ns2:SoftLayer_Network_StorageInitParameters>
<id>primary Volume Id</id>
</ns2:SoftLayer_Network_StorageInitParameters>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:disasterRecoveryFailoverToReplicant>
<replicantId xsi:type="int">replica Volume ID</replicantId>
</ns1:disasterRecoveryFailoverToReplicant>
: Returns true if expr1 is greater than or equal to expr2.
: Arguments

expr1, expr2the two expressions must be same type or can be cast to a common type, and must be a type that can be ordered. For example, map type is not orderable, so it is not supported. For complex types such array and struct, the data types of fields must be orderable.
: Example of an SQL function usage fragment

> SELECT 2 >= 1
: Result value

true
: Example of an SQL function usage fragment

> SELECT 2.0 >= '2.1'
: Result value

false
: Example of an SQL function usage fragment

> SELECT to_date('2009-07-30 04:17:52') >= to_date('2009-07-30 04:17:52')
: Result value

true
: Example of an SQL function usage fragment

> SELECT to_date('2009-07-30 04:17:52') >= to_date('2009-08-01 04:17:52')
: Result value

false
: Example of an SQL function usage fragment

> SELECT 1 >= NULL
: Result value

NULL





 ^ 

expr1 ^ expr2
: Returns the result of bitwise exclusive OR of expr1 and expr2.
: Example of an SQL function usage fragment

> SELECT 3 ^ 5
: Result value

2





 abs 

abs(expr)
: Returns the absolute value of the numeric value.
: Example of an SQL function usage fragment

> SELECT abs(-1)
: Result value

1





 acos 

acos(expr)
: Returns the inverse cosine (also known as arccosine) of expr if -1<;=expr<=1 or NaN otherwise.
: Example of an SQL function usage fragment

> SELECT acos(1)
: Result value

0.0
: Example of an SQL function usage fragment

> SELECT acos(2)
: Result value

NaN
resource: policyResource,
rule: policyRule,
pattern: policyPattern,
};

try {
const res = await iamPolicyManagementService.v2CreatePolicy(params);
examplePolicyId = res.result.id;
console.log(JSON.stringify(res.result, null, 2));
} catch (err) {
console.warn(err)
}

For more information about time-based conditions for access policies, see [Conditions in access policies](https://cloud.ibm.com/docs/account?topic=account-iam-condition-properties&interface=uipolicy-condition-properties).
Most function invocations look like function(argument1, ..., argumentN) but functions like TRIM(), POSITION(), FIRST(), LAST(), STRUCT(), EXTRACT(), and SUBSTRING() support a different invocation style.

Refer to section [SQL functions](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sqlfunctionssqlfunctions) for details about supported functions.





 More topics - function or aggregate clause 

For more information about the clauses that are used in a function or aggregate clause, see the following topics:



* [expression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceexpression)
* [qualifiedName](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencequalifiedName)
* [resultColumn](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceresultColumn)
* [valueExpression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencevalueExpression)
* [windowSpec](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencewindowSpec)







 Related references - function or aggregate clause 

A function or aggregate clause is referenced by the following clause:



* [primaryExpression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceprimaryExpression)







 Window functions 

Classic SQL aggregation functions like SUM(), MAX(), or MIN() process a group of rows to derive a single value. Window functions take this one step further by allowing to process a group of rows and derive a single value for each row in the group. Note the difference to scalar functions that return a single value for each row. Scalar functions derive a single value from a single row and not a group of rows.
df530c55-39c0-44e8-b7db-397593f70d90 my-test-key-3
e9b08526-3227-406c-b83f-c28844bd952b my-test-key-9
f141be88-5a34-4290-8513-4f01d934e75a my-test-key-5

 define a function for listing keys
$ list_keys () {
N=$1
S=$2
KEYS=$(ibmcloud kp keys --number-of-keys $N --starting-offset $S --output json | jq -r '.[] | .id')
for KEY_ID in $(echo "${KEYS}"); do
KEY_ID=$(ibmcloud kp key show $KEY_ID --output json | jq -r '.["id"]')
KEY_NAME=$(ibmcloud kp key show $KEY_ID --output json | jq -r '.["name"]')
echo $KEY_ID $KEY_NAME
done
}

 list the first group of keys
$ list_keys 5 0

10954149-0217-472d-8137-42fc330dbd03 my-test-key-16
16276369-ba81-4eb5-be92-f13512147ad4 my-test-key-14
215f592c-3e42-47b6-867c-3cc1cce8a8fd my-test-key-2
3a5a3b52-6942-463d-9f7a-5b216bbf5123 my-test-key-18
3b4b0511-00df-48e6-ad65-fad35bb6ce17 my-test-key-13

 list the second group of keys
$ list_keys 5 5
"name": "share-name1",
.
.
.
"latest_job": {
"status": "succeeded",
"status_reason": {
"code": "",
"message": "",
"more_info": ""
},
"type": "replication_failover"
}
}
Show more

For a replication split, when the replica share is being split from the source share, you can see a running status for latest_job in the response.

Example:

"latest_job": {
"status": "running",
"status_reason": {
"code": "",
"message": "",
"more_info": ""
},
"type": "replication_split"
},

A replication failover or split operation cannot happen if any other operation is being performed on the file share, such as expanding size. You can see a 409 error in the response that indicates the issue.

Example:

"errors": [
{
"code": "share_operation_pending",
"message": "An operation 'replication_failover' is pending on file share, request to 'replication_split' cannot be accepted.",
"more_info": "Before sending another request wait for the current operation to complete and try again."
}
],
"trace": "4634eee2-0a9b-43b7-b35e-8885cc258500"
SELECT TS_MATCH(ts4, TS_MATCHER_SUBSET_PS(0.6), ARRAY('a','b','d'))

Result:

[(0,'a'), (1,'b'), (7,'d')]
* The following SELECT statement returns the matching observations. The array [a,b,d] is a match because the following conditions are satisfied:



* The three values of the pattern occur in the input time series in the specified order. (They do not have to be contiguous.)
* The matcher threshold is 0.75, and the three input values represent at least 75% of the match sublist (a,b,c,d). If the threshold is set to a number greater than 0.75, this function returns null.



SELECT TS_MATCH(ts4, TS_MATCHER_SUBSET_PM(0.75), ARRAY('a','b','d'))

Result:

[(0,'a'), (1,'b'), (7,'d')]
* The following SELECT statement returns the observations that correspond to the entire match sublist, not merely the observations that correspond to the pattern. The array [a,b,d] is a match because the following conditions are satisfied:



* The three values of the pattern occur in the input time series in the specified order. (They do not have to be contiguous.)
* The matcher threshold is 0.8, and the resulting match sublist [a.b.c.d] represents at least 80% of the entire sequence (a,b,c,d,e). If the threshold is set to a number greater than 0.8, this function returns null.



SELECT TS_MATCH(ts4, TS_MATCHER_SUBSET_MS(0.8), ARRAY('a','b','d'))

Result:

[(0,'a'), (1,'b'), (3,c), (7,'d')]







 Set matching
The normal GET operation for the resource can then be used to poll for the completion of the operation.





 Operation-based long-running operations 

The operation resource MUST contain a status field and this field SHOULD be named status. The status field SHOULD be defined as an enumeration that includes the following values:



* not_started: the processing for the operation has not started
* succeeded: the processing for the operation has completed successfully
* failed: the processing for the operation failed



The enumeration for the status field SHOULD also have a value that indicates "in progress" -- this could be in_progress or a more specific value for the operation, such as creating.

If the operation status indicates that the operation failed, the operation SHOULD include an errors array with one or more [error models](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-errorserror-model) that describe the error(s) encountered in the operation processing.

The operation resource SHOULD contain an href property that matches the value of the Location header in the response to the original request.

For operations that result in, or manipulate, a resource the service MUST include the target resource location in the status upon operation completion.

Services MAY add additional, API specific, fields into the operation resource.



 Operation resources 

Services MAY provide an /operations collection.

Services that provide the "/operations" resource MUST provide GET semantics. GET MUST enumerate the set of operations, following standard pagination, sorting, and filtering semantics.

The service MUST NOT depend upon the client to consume the final status of the operation. In other words, the service must handle "fire and forget" client behavior. However, the service must preserve the operation result for a reasonable amount of time, for example 24 hours, to allow the client time to consume it.





 Cancellation 

Services MAY support operation cancellation by exposing DELETE on the operation. If supported, DELETE operations MUST be idempotent. Operations that support cancellation MUST sufficiently describe their cancellation such that the state of the system can be accurately determined, and any compensating actions may be run.







 Resource-based long-running operations
Is streaming not working? 

Streaming is failing because your Activity Tracker instance cannot connect to the Event Streams Kafka broker.

  What’s happening 

You get the following error message: Failed to connect to Kafka broker: KafkaJSSASLAuthenticationError: SASL PLAIN authentication failed: Authentication failed, invalid credentials.

  Why it’s happening 

The account has been configured to restrict access to configured IP address rules via IAM or the account limits the network locations that connections are accepted from.

  How to fix it 

Configure the account by allowlisting the Activity Tracker CIDR blocks in the account. For more information, see [Activity Tracker CIDR blocks](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-cidr). Follow the instructions in [Event Streams - Restricting network access](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-restrict_access).
curl --request POST https://api.eu-gb.logging.cloud.ibm.com/v1/config/stream -H "content-type: application/json" -H "servicekey: 0000000aaaa000000bbb00000ccc" -d '{"brokers":["kafka-0.mh-svc1-0000.eu-de.containers.appdomain.cloud:9093","kafka-1.mh-sv2.eu-de.containers.appdomain.cloud:9093","kafka-2.mh-sv3.eu-de.containers.appdomain.cloud:9093"],"topic":"at-dallas-topic","user":"token","password":"0000000_aaaa00000_0bbb00000ccc"}'

 How to fix it 

Place the data to be passed on the -d parameter in a file and then pass the file to the command instead.

In the previous example, create a file named data.json in the directory where you are running the cURL command with the following data:

{"brokers":["kafka-0.mh-svc1-0000.eu-de.containers.appdomain.cloud:9093","kafka-1.mh-sv2.eu-de.containers.appdomain.cloud:9093","kafka-2.mh-sv3.eu-de.containers.appdomain.cloud:9093"],"topic":"at-dallas-topic","user":"token","password":"0000000_aaaa00000_0bbb00000ccc"}

Then pass the file on the cURL command as follows:
54dd2745-7718-487f-85e6-a67e758dd945 my-test-key-17
62090ba8-7363-408e-9edc-aa9fb69c09be my-test-key-12
768c9ceb-368b-46f7-9b1d-be211e036fe1 my-test-key-4

87679194-52d0-42af-81e1-bffd64f87315 my-test-key-7
90138be5-1dd1-4eea-b7c1-73cc8609e7f7 my-test-key-19
b70f62a1-4d52-4526-91a9-ce47bf14c2a5 my-test-key-1
b8794334-eea6-4c0d-8fe1-8086300b13f7 my-test-key-6
bc459a2f-56cb-445e-b4ee-9d1866b57560 my-test-key-11

cc7faf46-43cf-43b2-be98-7d1815371639 my-test-key-8
cf0a3d8b-4856-4aa5-be6a-88cca465eab0 my-test-key-20
df530c55-39c0-44e8-b7db-397593f70d90 my-test-key-3
e9b08526-3227-406c-b83f-c28844bd952b my-test-key-9
f141be88-5a34-4290-8513-4f01d934e75a my-test-key-5

 define a function for listing keys
$ list_keys () {
N=$1
S=$2
* qualifiedName: Name of a table-generating function.
* expression: An expression that resolves to an array.
* identifier: Lateral view name, which is the name of the new virtual table.
* identifier: Lateral view column names.







 Examples - lateralView 

Lateral views are useful when you deal with repeating groups within a table that is not normalized tables. The examples show how to deal with tables that represent a 1-n relation and an n-m relation.

-- deal with a 1-n relation

SELECT
master_child.col1 AS master_id,
child_table.child_id
FROM VALUES
( 1 , ARRAY(1,2,3)),
(2, ARRAY(4,5,6)) AS master_child
LATERAL VIEW EXPLODE(master_child.col2) child_table AS child_id

The result of the example query is shown in the following table.



Table 16. Query result for example: deal with a 1-n relation.

 MASTER_ID CHILD_ID 

 1 1 
 1 2 
 1 3 
 2 4 
 2 5 
 2 6 



-- deal with an n-m relation

SELECT
master_table.master_id,
child_table.child_id
FROM VALUES
( ARRAY(10,20) , ARRAY(1,2,3)),
( ARRAY(30,40), ARRAY(4,5,6)) AS master_child
LATERAL VIEW EXPLODE(master_child.col1) master_table AS master_id
LATERAL VIEW EXPLODE(master_child.col2) child_table AS child_id

The result of the example query is shown in the following table.



Table 17. Query result for example: deal with an n-m relation.

 MASTER_ID CHILD_ID 

 10 1 
 10 2 
 10 3 
 20 1 
 20 2 
 20 3 
 30 4 
 30 5 
 30 6 
 40 4 
 40 5 
 40 6 







 More topics - lateral view
<br>Example:192.168.129.1 
 request_status <br>string Represents the status of a connection request between IBM Cloud accounts, and is only visible for cross account connections. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. <br>Possible values: [pending,approved,rejected,expired,detached] 
 status <br>string The connection's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. <br>Possible values: [attached,failed,pending,deleting,detaching,detached] 
 updated_at <br>date-time The date and time that this connection was last updated. 
 zone <br>ZoneReference The location of GRE tunnel. This field only applies to gre_tunnel and unbound_gre_tunnel type connections. 
 <br><br> * name <br> Always included* <br> string<br><br><br> Availability zone name <br>Example:us-south-1 





Table 4. Status codes

 Status Code 

 201 The transit gateway connection was created successfully. 
 400 An invalid connection template was provided. 
 404 The specified transit gateway could not be found, the specified resource group could not be found, or the default resource group could not be found (if the resource group was not specified in the template). 
 409 The network being connected must either be in a location that is considered "local" to the specified transit gateway, or the specified transit gateway must be global. The network being connected cannot already be connected to another transit gateway. 





 Example response 

This example illustrates the response from creating an unbound GRE tunnel:

{
"created_at": "2020-03-31T12:08:05Z",
"id": "1a15dca5-7e33-45e1-b7c5-bc690e569531",
"name": "example-connection",
"network_type": "unbound_gre_tunnel",
CASE dep.col2
WHEN 'A' THEN 'Administration'
WHEN 'B' THEN 'Human Resource'
WHEN 'C' THEN 'Development'
ELSE 'UNKOWN'
END AS dep_name
FROM VALUES (0, 'A'), (1, 'B'), (2, 'C'), (3, 'D'), (4, 'E') AS dep

The result of the example query is shown in the following table.



Table 49. Query result for example: simple case expression with ELSE clause.

 DEP_ID DEP_NAME 

 0 Administration 
 1 Human Resource 
 2 Development 
 3 UNKOWN 
 4 UNKOWN 



The two scalar functions that are specialized to handle a subset of the functionality that is provided by CASE are NULLIF() and COALESCE().



Table 50. CASE, NULLIF(), and COALESCE().

 Expression Equivalent expression 

 CASE WHEN e1=e2 THEN NULL ELSE e1 END NULLIF(e1,e2) 
 CASE WHEN e1 IS NOT NULL THEN e1 ELSE e2 END COALESCE(e1,e2) 
 CASE WHEN e1 IS NOT NULL THEN e1 ELSE COALESCE(e2,...,eN) END COALESCE(e1,e2,...,eN) 



For more information, see [SQL functions](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sqlfunctionssqlfunctions).

For more information about the clauses that are used by a case expression, see the following topic:



* [expression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceexpression)







 Related references - case expression 

A case expression is referenced by the following clause:



* [primaryExpression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceprimaryExpression)









 Time series expressions 

The syntax of a time series expression is described by the following syntax diagrams.
--search SEARCH (string)
: The search string for filtering results.

The maximum length is 100 characters. The minimum length is 0 characters. The value must match regular expression /[a-zA-Z0-9]/.

[--instance-id INSTANCE-ID] (string)
: The Unique identifier for IBM Cloud Event Notifications instance.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/.

[--force]
: Activate to force resource deletion (to bypass the confirmation prompt).







 ibmcloud event-notifications source get 



* Action: Get specific Source.

ibmcloud event-notifications source get --id ID [--instance-id INSTANCE-ID]
* Parameters to provide:

--id ID (string)
: Unique identifier for source. Required.

The maximum length is 100 characters. The minimum length is 1 character. The value must match regular expression /[a-zA-Z0-9-:_]/.

--offset OFFSET
: The offset for paginated results.

--search SEARCH
: The search string for filtering results.

[--instance-id INSTANCE-ID] (string)
: The unique identifier for IBM Cloud Event Notifications instance.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/.

[--force]
: Activate to force resource deletion (to bypass the confirmation prompt).
* [arithmeticOperator](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencearithmeticOperator)
* [comparisonOperator](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencecomparisonOperator)
* [primaryExpression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceprimaryExpression)
* [unaryOperator](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referenceunaryOperator)







 Related references - value expression 

A value expression is referenced by the following clauses:



* [booleanExpression](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencebooleanExpression)
* [functionOrAggregate](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencefunctionOrAggregate)
* [predicate](https://cloud.ibm.com/docs/sql-query?topic=sql-query-sql-referencepredicate)









 Primary expressions 



 primaryExpression 





 constant 





 interval 

With an interval clause, you can define time duration constants that can be used in expressions to add or subtract time ranges from a timestamp value.





 timeUnitSpec 

The following time units are valid:



* Singular form: SECOND, MINUTE, DAY, MONTH, YEAR
* Plural form: SECONDS, MINUTES, DAYS, MONTHS, YEARS



Both singular and plural forms can be used interchangeably.

The following example demonstrates how to add and subtract several time units from the current timestamp.

-- add and subtract several time units from the current timestamp
SELECT
CURRENT_TIMESTAMP
- INTERVAL 2 YEARS
+ INTERVAL 1 MONTH
- INTERVAL 3 DAYS
+ INTERVAL 10 HOURS
+ interval 30 MINUTES
]}],{"q":0,"scale":1,0]}],{"q":2,"scale":1,0]}],{"q":4,"scale":1,0]}],{"q":1,"scale":1,0]}],{"q":3,"scale":1,0]}],{"q":2,"scale":1,0]}],{"q":5,"scale":1,0]}],{"q":1,"scale":1,0]}],{"q":7,"scale":1,0]}],{"q":3,"scale":1,0]}],{"q":8,"scale":1,0]}],{"q":7,"scale":1,0]}],{"q":4,"scale":1,0]}],{"q":6,"scale":1,0]}],{"q":10,"scale":1,0]}],{"q":5,"scale":1,0]}],{"q":9,"scale":1,0]}],{"q":11,"scale":1,0]}],{"q":8,"scale"
For each match of a dictionary entry with input text, the extract dictionary statement generates an output tuple.







 Examples 

Example 1: Extracting terms from dictionary files

Find person names by using dictionary files of common given names and surnames with case-sensitive matching.

create view Name as
extract
dictionaries
'first.dict'
and 'last.dict'
with flags 'Exact'
on D.text
as name
from Document D;

The following is sample content of last.dict:

Dictionary for surnames
Anthony
Aparicio
Cate
Lehmann
Radcliff

The following is sample content of first.dict:

Dictionary for given names
Aaron
Candra
Freeman
Mathew
Matthew
Zoraida

Note:



* A dictionary file system that is directly referenced in an extract dictionary statement cannot be explicitly configured with a set of languages so that the dictionaries are compiled and applied at run time. Instead, the set of languages is specified with the set default dictionary language statement if the module contains this statement.

Therefore, direct referencing of dictionary files in an extract dictionary statement is not recommended and might be discontinued in the future. The preferred practice is to explicitly define a dictionary object by using the statement create dictionary from file, and then use that dictionary in the extract statement.
* The compiler and runtime component attempt to locate dictionary files that are referenced in AQLs under the configured search path.



Example 2: Extracting terms from an inline dictionary

Find conjunctions by using an inline dictionary and the default matching that is not case-sensitive.

create dictionary ConjunctionDict as
(
'and', 'or', 'but', 'yet'
);

create view Conjunction as
extract
dictionary 'ConjunctionDict'
on D.text
as name
from Document D;







 Splits 

Use the split extraction specification to split a large span into several smaller spans.



 Syntax 

split using <name>.<split point column>
[retain right|left|both] split points]]
on <name>.<column to split>
as <output name>





 Description