cwielenb/CNCF-Dataset huggingface dataset:
Project: StarRocks (App Definition and Development / Database)
File: count.md

displayed_sidebar: "English" Returns the total number of rows specified by an expression. This function has three variations: `COUNT(*)` counts all rows in a table, no matter whether they contain NULL values. `COUNT(expr)` counts the number of rows with non-NULL values in a specific column. `COUNT(DISTINCT expr)` counts the number of distinct non-NULL values in a column. `COUNT(DISTINCT expr)` is used for exact count distinct. If you require higher count distinct performance, see . From StarRocks 2.4 onwards, you can use multiple COUNT(DISTINCT) in one statement. ~~~Haskell COUNT(expr) COUNT(DISTINCT expr [,expr,...])` ~~~ `expr`: the column or expression based on which `count()` is performed. If `expr` is a column name, the column can be of any data type. Returns a numeric value. If no rows can be found, 0 is returned. This function ignores NULL values. Suppose there is a table named `test`. Query the country, category, and supplier of each order by `id`. ~~~Plain select * from test order by id; ++-+-++ | id | country | category | supplier | ++-+-++ | 1001 | US | A | supplier_1 | | 1002 | Thailand | A | supplier_2 | | 1003 | Turkey | B | supplier_3 | | 1004 | US | A | supplier_2 | | 1005 | China | C | supplier_4 | | 1006 | Japan | D | supplier_3 | | 1007 | Japan | NULL | supplier_5 | ++-+-++ ~~~ Example 1: Count the number of rows in table `test`. ~~~Plain select count(*) from test; +-+ | count(*) | +-+ | 7 | +-+ ~~~ Example 2: Count the number of values in the `id` column. ~~~Plain select count(id) from test; +--+ | count(id) | +--+ | 7 | +--+ ~~~ Example 3: Count the number of values in the `category` column while ignoring NULL values. ~~~Plain select count(category) from test; +--+ | count(category) | +--+ | 6 | +--+ ~~~ Example 4: Count the number of distinct values in the `category` column. ~~~Plain select count(distinct category) from test; +-+ | count(DISTINCT category) | +-+ | 4 | +-+ ~~~ Example 5: Count the number of combinations that can be formed by `category` and `supplier`. ~~~Plain select count(distinct category, supplier) from test; ++ | count(DISTINCT category, supplier) | ++ | 5 | ++ ~~~ In the output, the combination with `id` 1004 duplicates with the combination with `id` 1002. They are counted only once. The combination with `id` 1007 has a NULL value and is not counted. Example 6: Use multiple COUNT(DISTINCT) in one statement. ~~~Plain select count(distinct country, category), count(distinct country,supplier) from test; +--+--+ | count(DISTINCT country, category) | count(DISTINCT country, supplier) | +--+--+ | 6 | 7 | +--+--+ ~~~
Project: OrientDB (App Definition and Development / Database)
File: pull_request_template.md

What does this PR do? A brief description of the change being made with this pull request. Motivation What inspired you to submit this pull request? Related issues A list of issues either fixed, containing architectural discussions, otherwise relevant for this Pull Request. Additional Notes Anything else we should know when reviewing? Checklist [] I have run the build using `mvn clean package` command [] My unit tests cover both failure and success scenarios
Project: ClickHouse (App Definition and Development / Database)
File: v21.1.4.46-stable.md

sidebar_position: 1 sidebar_label: 2022 Backported in : Background thread which executes `ON CLUSTER` queries might hang waiting for dropped replicated table to do something. It's fixed. (). Backported in : Fix a bug that moving pieces to destination table may failed in case of launching multiple clickhouse-copiers. (). Backported in : Fix starting the server with tables having default expressions containing dictGet(). Allow getting return type of dictGet() without loading dictionary. (). Backported in : - Fix a segfault in function `fromModifiedJulianDay` when the argument type is `Nullable(T)` for any integral types other than Int32. (). Backported in : MaterializeMySQL: Fix replication for statements that update several tables. (). Backported in : Bugfix in StorageJoin. (). Backported in : The `MongoDB` table engine now establishes connection only when it's going to read data. `ATTACH TABLE` won't try to connect anymore. (). Backported in : Fix server crash after query with `if` function with `Tuple` type of then/else branches result. `Tuple` type must contain `Array` or another complex type. Fixes . (). Backported in : Fix rare server crash on config reload during the shutdown. Fixes . (). Backported in : Restrict to `DROP` or `RENAME` version column of `CollapsingMergeTree` and `ReplacingMergeTree` table engines. (). Backported in : Fix too often retries of failed background tasks for `ReplicatedMergeTree` table engines family. This could lead to too verbose logging and increased CPU load. Fixes . (). Backported in : Fix incorrect result of binary operations between two constant decimals of different scale. Fixes . (). Backported in : Fix null dereference with `joinusenulls=1`. (). Backported in : Avoid invalid dereference in RANGE_HASHED() dictionary. (). NO CL ENTRY: 'Revert "Backport to 21.1: Fix access control manager destruction order"'. (). Use fixed version of confluent-kafka library in integration tests (). Handle syntax error for ARRAY JOIN with no args ().
Project: KICS (Provisioning / Security & Compliance)
File: b17d8bb8-4c08-4785-867e-cb9e62a622aa.md

title: AKS Disk Encryption Set ID Undefined hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: b17d8bb8-4c08-4785-867e-cb9e62a622aa Query name: AKS Disk Encryption Set ID Undefined Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Encryption URL: Azure Container Service (AKS) should use Disk Encryption Set ID in supported types of disk<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "azurermkubernetescluster" "positive" { name = "example-aks1" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name dns_prefix = "exampleaks1" defaultnodepool { name = "default" node_count = 1 vmsize = "StandardD2_v2" } } ``` ```tf title="Negative test num. 1 - tf file" resource "azurermkubernetescluster" "negative" { name = "example-aks1" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name dns_prefix = "exampleaks1" diskencryptionset_id = "id" defaultnodepool { name = "default" node_count = 1 vmsize = "StandardD2_v2" } } resource "azurermkubernetescluster" "negative" { name = "example-aks1" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name dns_prefix = "exampleaks1" defaultnodepool { name = "default" node_count = 1 vmsize = "StandardD2_v2" osdisktype = "Ephemeral" } } ```
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_compute_regions.md

+++ title = "googlecomputeregions resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlecomputeregions" identifier = "inspec/resources/gcp/googlecomputeregions.md googlecomputeregions resource" parent = "inspec/resources/gcp" +++ A `googlecomputeregions` is used to test a Google Region resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource ``` describe googlecomputeregions(project: 'chef-gcp-inspec') do its('count') { should be >= 1 } its('regionnames') { should include "#{gcplocation}" } its('regionstatuses') { shouldnot include "DOWN" } its('region_ids') { should include "1290" } end ``` ```ruby googlecomputeregions(project: 'chef-inspec-gcp').regionnames.each do |regionname| describe googlecomputeregion(project: 'chef-inspec-gcp', region: region_name) do it { should be_up } end end ``` ```ruby describe googlecomputeregions(project: 'chef-inspec-gcp') do its('count') { should be >= 10} end ``` ```ruby describe googlecomputeregions(project: 'chef-inspec-gcp') do its('region_names') { should include 'europe-west2' } end ``` ```ruby describe googlecomputeregions(project: 'chef-inspec-gcp') do its('regionstatuses') { shouldnot include "DOWN" } end ``` ```ruby googlecomputeregions(project: gcpprojectid).where(regionname: /^europe/).regionnames.each do |region_name| describe googlecomputeregion(project: 'chef-inspec-gcp', region: region_name) do it { should be_up } end end ``` Properties that can be accessed from the `googlecomputeregions` resource: See the resource for more information. `creation_timestamps` : an array of `googlecomputeregion` creation_timestamp `deprecateds` : an array of `googlecomputeregion` deprecated `descriptions` : an array of `googlecomputeregion` description `region_ids` : an array of `googlecomputeregion` id `region_names` : an array of `googlecomputeregion` name `quotas` : an array of `googlecomputeregion` quotas `region_statuses` : an array of `googlecomputeregion` status `zones` : an array of `googlecomputeregion` zones This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. Ensure the is enabled for the current project.
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.21.md

layout: release date: 2022-11-03 tag: v0.6.21 language: en fix ui crash in extension @Abhishek-kumar09 (#6487) [Fix] fix next build failure in ci @Abhishek-kumar09 (#6486) [WIP] Tracking cookies to add a Popup in Meshery @warunicorn19 (#6479) [fix] Fix golangci-lint tests @devkapilbansal (#6484) Add Env variable for Enforcing provider @Revolyssup (#6440) Thank you to our contributors for making this release possible: @Abhishek-kumar09, @Revolyssup, @acald-creator, @devkapilbansal, @leecalcote and @warunicorn19
Project: Kapitan (Provisioning / Automation & Configuration)
File: classes.md

The next thing you want to learn about the inventory are . A class is a yaml file containing a fragment of yaml that we want to import and merge into the inventory. are fragments of yaml: feature sets, commonalities between targets. let you compose your from smaller bits, eliminating duplication and exposing all important parameters from a single, logically organised place. As the lets you reference other parameters in the hierarchy, become places where you can define something that will then get referenced from another section of the inventory, allowing for composition. are organised under the directory substructure. They are organised hierarchically in subfolders, and the way they can be imported into a or other depends on their location relative to the directory. To import a class from within another file of the , you can follow these instructions: take the file path relative to the `inventory/classes/` directory remove the `.yml` file extension replace `/` with `.` For example, this will import the class `inventory/classes/applications/sock-shop.yaml` ```yaml classes: applications.sock-shop ``` Let's take a look at the `common` class which appears in the example above: As explained, because the `common.yaml` is directly under the `inventory/classes` subdirectory, it can be imported directly into a target with: ```yaml classes: common ``` If we open the file, we find another familiar yaml fragment. !!! example "`inventory/classes/common.yml`" ```yaml classes: kapitan.common parameters: namespace: ${target_name} targetname: ${reclass_:name:short} ``` Notice that this class includes an import definition for another class, `kapitan.common`. We've already learned this means that kapitan will import a file on disk called `inventory/classes/kapitan/common.yml` You can also see that in the `parameters` section we now encounter a new syntax which unlocks another powerful inventory feature: parameters interpolation!
Project: YugabyteDB (App Definition and Development / Database)
File: ddl_create_user_mapping.md

title: CREATE USER MAPPING statement [YSQL] headerTitle: CREATE USER MAPPING linkTitle: CREATE USER MAPPING description: Use the CREATE USER MAPPING statement to create a user mapping. menu: v2.18: identifier: ddlcreateuser_mapping parent: statements type: docs Use the `CREATE USER MAPPING` command to define the mapping of a specific user to authorization credentials in the foreign server. The foreign-data wrapper uses the information provided by the foreign server and the user mapping to connect to the external data source. The owner of a foreign server can create user mappings for the server for any user. Moreover, a user can create user mapping for themself if they have `USAGE` privilege on the server. {{%ebnf%}} createusermapping {{%/ebnf%}} Create a user mapping for the user user_name for the server server_name. If a mapping between the user and the foreign server already exists, an error will be raised unless the `IF NOT EXISTS` clause is used. The `OPTIONS` clause specifies options for the foreign-data server. They typically define the mapped username and password to be used on the external data source, but the actual permitted option names and values are specific to the servers foreign data wrapper. Basic example. ```plpgsql yugabyte=# CREATE USER MAPPING FOR myuser SERVER my_server OPTIONS (user 'john', password 'password'); ```
Project: KubeVela (App Definition and Development / Application Definition & Image Build)
File: hpa.eg.md

```yaml apiVersion: core.oam.dev/v1beta1 kind: Application metadata: name: helloworld spec: components: name: helloworld type: webservice properties: cpu: "0.5" exposeType: ClusterIP image: oamdev/hello-world memory: 1024Mi ports: expose: true port: 80 protocol: TCP traits: type: scaler properties: replicas: 1 type: hpa properties: targetAPIVersion: apps/v1 targetKind: Deployment max: 10 min: 1 cpu: type: Utilization value: 80 mem: type: AverageValue value: 90 podCustomMetrics: name: podnetreceived_rate value: "77" name: podnettransmitted_rate value: "88" name: podnetreceivedpacketsrate value: "95" name: podnettransmittedpacketsrate value: "99" policies: name: apply-once type: apply-once properties: enable: true rules: strategy: path: ["spec.replicas"] selector: resourceTypes: ["Deployment","StatefulSet"] ```
Project: YugabyteDB (App Definition and Development / Database)
File: nodejs.md

title: Build a YugabyteDB application using NodeJS and YEDIS headerTitle: Build an application using NodeJS linkTitle: NodeJS description: Use NodeJS to build a YugabyteDB application that interacts with YEDIS aliases: /preview/yedis/develop/client-drivers/nodejs menu: preview: identifier: client-drivers-yedis-nodejs parent: develop-yedis type: docs Install the NodeJS driver using the following command. ```sh $ npm install redis ``` This tutorial assumes that you have: installed YugabyteDB, created a universe, and are able to interact with it using the Redis shell. If not, follow the steps in . installed a recent version of `node`. If not, you can find install instructions . Create a file `yb-redis-helloworld.js` and add the following content to it. ```js const redis = require("redis") const client = redis.createClient(); client.on("error", function (err) { console.log("Error " + err); }); // Insert the user profile. const userid = 1 client.hmset(userid, ["name", "John", "age", "35", "language", "NodeJS"], redis.print); // Query the user profile. client.hmget(userid, ["name", "age", "language"], redis.print); // Close the client. client.quit(function (err, res) { console.log('Exiting from quit command.'); }); ``` To run the application, type the following: ```sh $ node yb-redis-helloworld.js ``` You should see the following output. ``` Reply: OK Reply: John,35,NodeJS Exiting from quit command. ```
Project: Apache Heron (App Definition and Development / Streaming & Messaging)
File: guides-simulator-mode.md

id: version-0.20.0-incubating-guides-simulator-mode title: Simulator Mode sidebar_label: Simulator Mode original_id: guides-simulator-mode <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> Simulator mode is specifically designed for topology developers to easily debug or optimize their topologies. Simulator mode simulates a heron cluster in a single JVM process, which is useful for developing and testing topologies. Running topologies under simulator mode is similar to running topologies on a cluster. To run in simulator mode, use the ``SimulatorMode`` class, which is in ``storm-compatibility-unshaded_deploy.jar`` (under ``bazel-bin/storm-compatibility/v0.10.2/src/java``). For example: ```java import org.apache.heron.simulator.Simulator; Simulator simulator = new Simulator(); ``` You can then submit topologies using the ``submitTopology`` method on the ``Simulator`` object. Just like the corresponding method on ``StormSubmitter``, ``submitTopology`` takes a name, a topology configuration, and a topology object. For example: ```java simulator.submitTopology("test", conf, builder.createTopology()); ``` Other lifecycle methods to use with simulator mode are: ```java simulator.killTopology("test"); simulator.activate("test"); simulator.deactivate("test"); simulator.shutdown(); ``` To kill a topology, one could also terminate the process. The simulator mode will run in separate threads other than the main thread. All the above methods are thread-safe. This means that one could invoke these methods in other threads and monitor the corresponding behaviors interactively. Bolts and Spouts run as separate threads in simulator. To add breakpoints inside a bolt/spout, the Suspend Policy of the breakpoint needs to be set to Thread. To change the Suspend Policy, right click on the breakpoint as shown in the following image: If it's not convenient to check the output and logs in the IntelliJ console, save them to a local file by choosing `Run -> Edit Configurations....` as shown in the following image:
Project: SPIRE (Provisioning / Key Management)
File: plugin_agent_nodeattestor_tpm_devid.md

Must be used in conjunction with the server-side tpm_devid plugin The `tpm_devid` plugin provides attestation data for a node that owns a TPM and that has been provisioned with a LDevID certificate through an out-of-band mechanism. The plugin responds to two challenges requested by the server: A proof-of-possession challenge: The agent receives and signs a random nonce to prove it is in possession of the private key that corresponds to the LDevID certificate presented to the server. A proof-of-residency challenge: The agent receives and solves a specially-crafted, encrypted challenge to prove to the server that the LDevID keypair was generated and resides in a TPM of a trusted vendor. The proof-of-residency verification involves the creation of a temporary attestation key. Currently, this attestation key is always an RSA key independent of whether the DevID is using an ECC or RSA key type. The SPIFFE ID produced by the server-side `tpm_devid` plugin is based on the LDevID certificate fingerprint, where the fingerprint is defined as the SHA1 hash of the ASN.1 DER encoding of the identity certificate. The SPIFFE ID has the form: ```xml spiffe://<trustdomain>/spire/agent/tpmdevid/<fingerprint> ``` | Configuration | Description | Default | |-|--|--| | `tpmdevicepath` | The path to a TPM 2.0 device. It is not used when running on windows. | If unset, the plugin will try to autodetect the TPM path | | `devidcertpath` | The path to the DevID certificate on disk in PEM format. | | | `devidprivpath` | The path to the private key blob generated by the TPM. | | | `devidpubpath` | The path to the public key blob generated by the TPM. | | | `endorsementhierarchypassword` | TPM endorsement hierarchy password. | "" | | `ownerhierarchypassword` | TPM owner hierarchy password. | "" | | `devid_password` | DevID keys password (must be the same than the one used in the provisioning process) | "" | A sample configuration: ```hcl NodeAttestor "tpm_devid" { plugin_data { devidcertpath = "/opt/spire/conf/agent/devid.crt.pem" devidprivpath = "/opt/spire/conf/agent/devid.priv.blob" devidpubpath = "/opt/spire/conf/agent/devid.pub.blob" } } ``` This plugin is designed to work with TPM 2.0, TPM 1.2 is not supported. Only local device identities (LDevIDs) are supported. Attestation using IDevIDs is not supported.
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_spanner_instance.md

+++ title = "googlespannerinstance resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlespannerinstance" identifier = "inspec/resources/gcp/googlespannerinstance.md googlespannerinstance resource" parent = "inspec/resources/gcp" +++ A `googlespannerinstance` is used to test a Google Instance resource ```ruby describe googlespannerinstance(project: 'chef-gcp-inspec', name: 'spinstance', config: 'regional-us-east1') do it { should exist } its('config') { should match 'regional-us-east1' } its('name') { should match 'spinstance' } its('display_name') { should eq 'inspectest' } its('node_count') { should eq '1' } its('labels') { should include('env' => 'test') } end ``` Properties that can be accessed from the `googlespannerinstance` resource: `name` : A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. `config` : The name of the instance's configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form `regional-europe-west1` , `us-central` etc. In order to obtain a valid list please consult the . `display_name` : The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. `node_count` : The number of nodes allocated to this instance. `labels` : An object containing a list of `"key": "value"` pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Ensure the is enabled for the current project.
Project: YDB (App Definition and Development / Database)
File: alter-user.md

Changes the user password. Syntax: ```yql ALTER USER user_name [ WITH ] option [ ... ] ``` `user_name`: The name of the user. `option`: The password of the user: `PASSWORD 'password'` creates a user with the `password` password. The `ENCRYPTED` option is always enabled. `PASSWORD NULL` creates a user with an empty password.