vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* Provide a description (optional) of the Schematics workspace.
* Click Next and then click Create. The Schematics workspace is created with the name that you specified.



4. Go to Schematic Workspace Settings, and in the variable section, click "burger icons" to update the following parameters:



* Update api_key with the API key value. Mark it as sensitive to hide the API key in the IBM Cloud console.
* Update ssh_key_name with your IBM Cloud SSH key name such as "slurm-ssh-key" that is created in a specific region in IBM Cloud.
* Update the zone value where the cluster should be deployed.
* Update the cluster_prefix value to the specific cluster prefix for your Slurm cluster.
* Update the cluster_id. This is the ID of the cluster that is used by Slurm for configuration of resources.
* Update the worker_node_count according to your requirement.









 Next steps 

After you've successfully created a workspace, you can begin [Generating a plan](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-generate-plan&interface=uigenerate-plan-ui) to validate all of the configuration properties.





 Before you begin 

Before you get started, make sure that you've completed the prerequisites found in [Setting up the IBM Cloud Schematics CLI](https://cloud.ibm.com/docs/hpc-slurm?topic=hpc-slurm-setting-up-cli&interface=cli).





 Creating a workspace using the CLI 

The first step when using Schematics is to create a workspace with the specific configuration parameters defined in the corresponding Terraform source code.

Use the following CLI command to create a workspace with your config.json file. Make sure that the config.json file exists in the directory where you run the command.

ibmcloud schematics workspace new -f hpc_workspace_config.json --github-token GITHUB_TOKEN
3. Enter the resource group where you want to create the action and press the return key.
4. Enter the location where you want to create the action, such as us-south, us-east, eu-de, or eu-gb. Then, press the return key. The location determines where your action runs and where your action data is stored. For more information, see [Where is my information stored?](https://cloud.ibm.com/docs/schematics?topic=schematics-secure-datapi-location). Make sure that you can store data in this location as you cannot change the location after the action is created.
5. Enter the URL to the GitHub repository where your Ansible playbook is stored. Then, press the return key.
6. If applicable, enter the personal access token that you want to use to access your GitHub repository. Then, press the return key. If you want to clone from the Git repository see the [allowed and blocked file extensions](https://cloud.ibm.com/docs/schematics?topic=schematics-workspaces-faqclone-file-extension) for cloning.
7. Enter the name of the Ansible playbook that you want to run and press the return key.
8. Review the details of the action that was created for you.









 ibmcloud schematics action update 

Update the information of an existing action by using an action ID. Ensure the location and the url endpoint are pointing to the same region when you create or update the workspaces and actions. For more information about location and endpoint, see [Where is my information stored?](https://cloud.ibm.com/docs/schematics?topic=schematics-secure-datapi-location).

Syntax
* Editor: Can view, create, and delete instances at the account level, except invite new users, manage the account, and assign access policies. Has limited use for actions within a service instance, beyond the ability to view them.
* Operator: Can view instances at the account level, but cannot edit them. Has limited use for actions within a service instance, beyond the ability to view them.
* Viewer: Can view instances at the account level, but cannot edit them. Has limited use for actions within a service instance, beyond the ability to view them.







 Service roles 

While an account-level role gives a user particular permissions over service instances by default, roles can also be assigned over a particular service instance. Service roles can be applied to the three first class objects within a service instance: the instance as a whole, particular workspace, and action. However, these permissions can be assigned more granularly where necessary. For example giving a user the Manager role over only a particular workspace or resource and some lesser level of permission over the instance as a whole.

Service roles can be assigned per-instance or for all instances in an account.



* Reader: You can perform read-only actions within a service such as viewing service-specific resources. For example, read the action definition, KMS settings, workspace details, agent configuration settings, and so on.
* Writer: You can perform create, edit, and read service specific resources operation. For example, create and update workspace, action, agent, blueprint, and so on.
* Manager: In addition to writer access, you have complete privilege as defined by the service. A Manager, for example, has all of the permissions that a Reader has and more.









 Roles and permissions about Schematics offerings 

The list provides the details about the roles and permission needed for the [Schematics offerings](https://cloud.ibm.com/docs/schematics?topic=schematics-learn-about-schematicssc-offerings).



 Workspace permissions 

Review the following table to see what permissions you need to work with Schematics Workspaces.



User permissions for Schematics Workspaces
The table shows user permissions by access role.
The server and port values come from the printed output of [Step 4](https://cloud.ibm.com/docs/%7Bcreate-infra). Leave the database blank. The username is "admin". The password is the one you created in [Step 2](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-bi-connector-tutorial-descriptionclone-repo).

Zoom

![MongoDB Connector Values](https://cloud.ibm.com/docs-content/v1/content/5561b38c6df9e8168523d143eaf64ab6acd7b600/cloud-databases/images/tableau-connect-variables.png)

Figure 3. Enter your MongoDB Connector Values

In the Initial SQL tab, enter "FLUSH SAMPLE" and click "Sign In"

Zoom

![Type FLUSH SAMPLE](https://cloud.ibm.com/docs-content/v1/content/5561b38c6df9e8168523d143eaf64ab6acd7b600/cloud-databases/images/tableau-flush-sample.png)

Figure 4. Type FLUSH SAMPLE

The FLUSH SAMPLE command tells the BI Connector to re-create the necessary tabular schema from a sample of the collection documents. Whenever your document structure changes, you need to reexecute the FLUSH SAMPLE command to re-create the BI Connector schema.

If your database has many documents, schema creation is a time-consuming process. You should only run FLUSH SAMPLE if your document structure changes or you create new collections.





 Step 7: Visualize your data! 

You can now select the WHO database on the right. Next, press "Update Now" to see the data in tabular format.

Zoom

!
To use the files in the GitHub repo in Schematics, you need a personal access token. When you create the token, copy it to a text file for future use. When you leave the create token page, you can no longer view the token.



1. Go to the [MZR GitHub repository](https://github.ibm.com/workload-eng-services/ha-mzr).
2. Select Settings from your account icon menu.
3. Select Developer settings.
4. Select Personal Access Tokens.
5. Select Generate new token.
6. Copy the new token and save it in a text file.



After you have your access token, use Schematics to create your infrastructure.



1. From the IBM Cloud menu, select [Schematics](https://cloud.ibm.com/schematics/overview).
2. Click Workspaces.
3. Click Create workspace.
4. On the Specify template page:



* Enter the URL of high availability MZR repo, [https://github.ibm.com/workload-eng-services/ha-mzr](https://github.ibm.com/workload-eng-services/ha-mzr).
* Enter your Personal Access Token.
* Select the Terraform version that is listed in the readme file.
* Click Next.



5. On the Workspace details page:



* Enter a name for the workspace.
* Select a Resource group.
* Select a Location for your workspace. The workspace location does not have to match the resource location.
* Select Next.



6. Select Create to create your workspace. The files from the GitHub repo are loaded in to Schematics. It can take several minutes for the files to load.
7. On the workspace Settings page, in the Input variables section, review the default input variables and provide values that match your solution. Some parameters have default values.
This file invokes the variables from the terraform.tfvars file by using the Git URL, then creates a Schematics Workspaces by using your IBM Cloud API key.

variable "schematics_workspace_name" {}
variable "schematics_workspace_description" {}
variable "schematics_workspace_type" {}
variable "schematics_workspace_location" {}
variable "schematics_workspace_resource_group" {}
variable "ibmcloud_api_key" {}

resource "ibm_schematics_workspace" "schematics_workspace_instance" {
name = var.schematics_workspace_name
description = var.schematics_workspace_description
location = var.schematics_workspace_location
resource_group = var.schematics_workspace_resource_group
tags = ["sample"]
template_env_settings = [
{ env1 = "val1" },
{ env2 = "val2" }
]
template_type= var.schematics_workspace_type
template_git_url = "https://github.com/IBM-Cloud/terraform-provider-ibm/tree/master/examples/ibm-api-gateway"
}

provider "ibm" {
region = "us-south"
ibmcloud_api_key = var.ibmcloud_api_key
}

Show more

The following table lists supported parameters when you create and initialize a service instance with Terraform. For more information about the detailed parameters to create workspace, see [ibm_schematics_workspace](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/schematics_workspace) resource.



Supported parameters for creating Schematics Workspaces with Terraform.

 Parameter Description 

 description The description of the workspace. 
 location The location where you want to create your Schematics Workspaces and run Schematics Actions.
To list the first workspace in the list, enter 0. To list the second workspace, enter 1 and so forth. Negative numbers are not supported and are ignored. The default value is -1. 
 --json or -j Deprecated Prints the output in the JSON format. 
 --output or -o Optional Returns the command-line output in JSON format. Currently only JSON file format is supported. 
 --region or -r Optional Specify the region, such as eu, us, eu-gb, eu-de, us-south, or us-east. 



Example

ibmcloud schematics workspace list --limit 10 --offset 20 --json





 ibmcloud schematics workspace new 

Create a Schematics Workspaces that points to your Terraform template in GitHub or GitLab. If you want to provide your Terraform template by uploading a tape archive file (.tar), you can create the workspace without a connection to a GitHub repository and then use the [ibmcloud schematics workspace upload](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-workspace-upload) command to provide the template.

Schematics does not support passing .tar file to create a workspace.

IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The location can be us-east, us-south, eu-gb, or eu-de region. You need to wait before calling the command again.

To create a workspace, you specify all workspace settings using a JSON input file. Make sure that the JSON file follows the structure as outlined in this command. To successfully create a workspace, ensure the CLI region is set to the region where you want to create or update workspaces and actions. The workspace name, location, resource group and git repo are all defined in the JSON input file. For more information about Schematics locations where your workspace data is stored, see [Where is my information stored?]
To list the first workspace in the list, enter 0. To list the second workspace, enter 1 and so forth. Negative numbers are not supported and are ignored. The default value is -1. 
 --json or -j Deprecated Prints the output in the JSON format. 
 --output or -o Optional Returns the command-line output in JSON format. Currently only JSON file format is supported. 
 --region or -r Optional Specify the region, such as eu, us, eu-gb, eu-de, us-south, or us-east. 



Example

ibmcloud schematics workspace list --limit 10 --offset 20 --json





 ibmcloud schematics workspace new 

Create a Schematics Workspaces that points to your Terraform template in GitHub or GitLab. If you want to provide your Terraform template by uploading a tape archive file (.tar), you can create the workspace without a connection to a GitHub repository and then use the [ibmcloud schematics workspace upload](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-workspace-upload) command to provide the template.

Schematics does not support passing .tar file to create a workspace.

IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The location can be us-east, us-south, eu-gb, or eu-de region. You need to wait before calling the command again.

To create a workspace, you can specify your workspace settings in a JSON file. Make sure that the JSON file follows the structure as outlined in this command. Also ensure the location and the url endpoint are pointing to the same region when you create or update workspaces and actions. For more information about location and endpoint, see [Where is my information stored?](https://cloud.ibm.com/docs/schematics?topic=schematics-secure-datapi-location).
To list the first workspace in the list, enter 0. To list the second workspace, enter 1 and so forth. Negative numbers are not supported and are ignored. The default value is -1. 
 --json or -j Deprecated Prints the output in the JSON format. 
 --output or -o Optional Returns the command-line output in JSON format. Currently only JSON file format is supported. 
 --region or -r Optional Specify the region, such as eu, us, eu-gb, eu-de, us-south, or us-east. 



Example

ibmcloud schematics workspace list --limit 10 --offset 20 --json





 ibmcloud schematics workspace new 

Create an Schematics Workspaces that points to your Terraform template in GitHub or GitLab. If you want to provide your Terraform template by uploading a tape archive file (.tar), you can create the workspace without a connection to a GitHub repository and then use the [ibmcloud schematics workspace upload](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-workspace-upload) command to provide the template.

Schematics does not support passing .tar file to create a workspace.

IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The location can be us-east, us-south, eu-gb, or eu-de region. You need to wait before calling the command again.

To create a workspace, you can specify your workspace settings in a JSON file. Make sure that the JSON file follows the structure as outlined in this command. Also ensure the location and the url endpoint are pointing to the same region when you create or update workspaces and actions. For more information about location and endpoint, see [Where is my information stored?](https://cloud.ibm.com/docs/schematics?topic=schematics-secure-datapi-location).
You can see the list of workspaces in View the existing installations. If the workspace creation is successful, the Apply Plan action is started to trigger the deployment of the respective IBM Cloud VPC resources in your IBM Cloud account.
8. You can also review the status of your deployment process by identifying the workspace name in the View the existing installations section. When you click a record in View the existing installations section, you are taken to the Schematics workspace view.







 Next steps 

After you've successfully created a workspace, you can begin [Generating a plan](https://cloud.ibm.com/docs/hpc-spectrum-scale?topic=hpc-spectrum-scale-generate-plan&interface=ui) to validate all of the configuration properties.





 Before you begin 

Before you get started, make sure that you've completed the prerequisites found in [Setting up the IBM Cloud Schematics CLI](https://cloud.ibm.com/docs/hpc-spectrum-scale?topic=hpc-spectrum-scale-setting-up-cli).





 Creating a workspace using the CLI 

The first step when using Schematics is to create a workspace with the specific configuration parameters defined in the corresponding Terraform source code.

Use the following CLI command to create a workspace with your config.json file. Make sure that the config.json file exists in the directory where you run the command.

ibmcloud schematics workspace new -f hpc_workspace_config.json --github-token GITHUB_TOKEN

The --github-token parameter is optional and only needed if you are using a private GitHub repository. If you are using the [IBM public GitHub repository](https://github.com/IBM/ibm-spectrum-scale-ibm-cloud-schematics), you do not need to provide it.



 Listing available workspaces 

You can list the workspaces in your account by using the following command:

ibmcloud schematics workspace list

Example response with workspace details:

Name           ID       Description           Status         Frozen
"name": "service_instance_name",
"value": "myservice",
"type": "string"
},
{
"name": "flavor",
"value": "cx2.2x4",
"type": "string"
},
{
"name": "cluster_name",
"value": "cluster",
"type": "string"
},
{
"name": "region",
"value": "us-south",
"type": "string"
},
{
"name": "worker_count",
"value": "1",
"type": "string"
},
{
"name": "resource_group",
"value": "Default",
"type": "string"
}
]
}
],
"githubtoken": "<provide your githubtoken>"
}
Show more

You can edit the payload values for the variable as stated in the table:



Payload details

 Variable Value 

 name Specify your unique name. 
 type Terraform v1.0 
 githubtoken Specify your GitHub token. 
 variablestore Specify the resource group and its details. Enter the input variable such as name, type, and value that you declared in Terraform configuration file. For more information about variable store, see [Variable store parameter](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-workspace-update). 



2. Create the workspace by using the JSON file from command-line interface.

ibmcloud schematics workspace new --file <fully qualified path of cluster_payload.JSON file>
"name": "<ACTION_NAME>",
"description": "<DESCRIPTION>",
"location": "<LOCATION>",
"resource_group": "<RESOURCE_GROUP>",
"bastion_connection_type": "ssh",
"inventory_connection_type": "winrm",
"source": {
"source_type" : "git",
"git" : {
"git_repo_url": "<YOUR_REPOSITORY>"
}
},
"command_parameter": "<PLAYBOOK_NAME>",
"bastion": {},
"bastion_credentials": {
"metadata": {}
},
"tags": [
"<ACTION_TAGS>"
],
"source_readme_url": "stringtype",
"source_type": "GitHub"
}
Show more

ibmcloud schematics action create --file <FILE_NAME>

Example

ibmcloud schematics action create --file sample.json





 Using the interactive mode 

Instead of entering the command options or using a payload file, you can use the command's interactive mode to create an action. By default, the action is created with minimal user input. To add more information to your action, you can update the action later.



1. Initiate the interactive mode by running the command without command options.

ibmcloud schematics action create
2. Enter a name for your action and press the return key.
3. Enter the resource group where you want to create the action and press the return key.
4. Enter the location where you want to create the action, such as us-south, us-east, eu-de, or eu-gb. Then, press the return key. The location determines where your action runs and where your action data is stored. For more information, see [Where is my information stored?]
The following example illustrates the federation of two Db2 Warehouse on Cloud databases:



 On the Db2 Warehouse on Cloud target machine 

Host name: targetdotcom



1. Create a table testdata in schema admin2.
2. From the Db2 Warehouse on Cloud console, load the testdata table with data as user admin2 with password YYYY.







 On a Db2 Warehouse on Cloud machine being used as a federation source 

From the Db2 Warehouse on Cloud console:



1. Create a server to talk to the target machine:
create server <server_name> type dashdb version 11 wrapper drda authorization "<admin_user_on_target>" password "<admin_password_on_target>" options (host '<target_host_name>', port '50000', dbname 'bludb')

For example:
create server db2server type dashdb version 11 wrapper drda authorization "admin2" password "YYYY" options (host 'targetdotcom', port '50000', dbname 'bludb')
2. Create the user mapping for admin2:
create user mapping for <admin_user> server db2server options (remote_authid '<admin_user_on_target>', remote_password '<admin_password_on_target>')

For example:
create user mapping for admin1 server db2server options (remote_authid 'admin2', remote_password 'YYYY')
3. Create a nickname for the database:
create nickname <nickname> for <server_name>.<schema_name>.<table_name>

For example:
create nickname ntest1 for db2server.admin2.testdata
4. Test that you can pull data from the target server:
select * from <nickname>

For example:
select * from ntest1









 Additional information
firstArg table( spanVal Span ) as locator,
secondArg table( spanVal Span, strVal Text ) as locator
)
return table( outSpan1 Span, outSpan2 Span, outStr Text)
external_name
'udfjars/udfs.jar:com.ibm.test.udfs.TableConsumingTableFunc!eval'
language java
deterministic
called on null input;

-- Create two views to serve as inputs to the table function.
-- Note that column names don't match, but types do.
create view FirstInputView as
extract regex /d+/ on 1 token in D.text as match
from Document D;

create view SecondInputView as
select S.match as spanCol, 'Dummy string' as textCol
from
(extract regex /[A-Z]+/ on 1 token in D.text as match
from Document D) S;

-- Use the table function
create view TabFuncOutput as
select T.outSpan1 as span1, T.outSpan2 as span2
from MyTableFunc(FirstInputView, SecondInputView) T;
Show more

As in Example 2, The example defines two views: FirstInputView with schema (match Span) and SecondInputView with schema (spanCol Span, textCol Text). The last view in the example, TabFuncOutput invokes the table function MyTableFunc in the from clause, with the two input views. As explained in Example 2, a view is compatible with a table locator argument of a function, as long as the number of columns and the column types in the schema of the input view and table locator match. However, it is not necessary that the column names match.

Finally, the select clause discards column outStr from the output table of MyTableFunc, keeping only the first two columns outSpan1 and outSpan2.

Example 4: Using a table UDF implemented in PMML