{"id":42369582,"url":"https://github.com/v3io/v3io-tsdb","last_synced_at":"2026-01-27T19:18:00.047Z","repository":{"id":32062823,"uuid":"125124689","full_name":"v3io/v3io-tsdb","owner":"v3io","description":"iguazio API lib for time-series DB access and Prometheus TSDB storage driver ","archived":false,"fork":false,"pushed_at":"2025-08-13T05:58:22.000Z","size":30010,"stargazers_count":32,"open_issues_count":3,"forks_count":21,"subscribers_count":9,"default_branch":"development","last_synced_at":"2025-08-13T07:23:22.985Z","etag":null,"topics":["iguazio","kubernetes","nuclio","prometheus","tsdb"],"latest_commit_sha":null,"homepage":"https://www.iguazio.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v3io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-13T22:51:15.000Z","updated_at":"2025-08-13T05:58:26.000Z","dependencies_parsed_at":"2024-01-06T13:09:38.603Z","dependency_job_id":"bca870cd-73cf-4263-81d7-fc31e8e1e6ec","html_url":"https://github.com/v3io/v3io-tsdb","commit_stats":{"total_commits":666,"total_committers":20,"mean_commits":33.3,"dds":0.8093093093093093,"last_synced_commit":"d5fd8d30e342010b9f873bc2a9a79a3e06815987"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"purl":"pkg:github/v3io/v3io-tsdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3io%2Fv3io-tsdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3io%2Fv3io-tsdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3io%2Fv3io-tsdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3io%2Fv3io-tsdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v3io","download_url":"https://codeload.github.com/v3io/v3io-tsdb/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v3io%2Fv3io-tsdb/sbom","scorecard":{"id":914035,"data":{"date":"2025-08-11","repo":{"name":"github.com/v3io/v3io-tsdb","commit":"8082dea28cff91978d0061da15d454de8d6618aa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":5,"reason":"Found 17/29 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/pr.yaml:24","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yaml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/v3io/v3io-tsdb/pr.yaml/development?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.15.0 not signed: https://api.github.com/repos/v3io/v3io-tsdb/releases/239943124","Warn: release artifact v0.14.1 not signed: https://api.github.com/repos/v3io/v3io-tsdb/releases/91382550","Warn: release artifact v0.14.0 not signed: https://api.github.com/repos/v3io/v3io-tsdb/releases/90836073","Warn: release artifact v0.13.1 not signed: https://api.github.com/repos/v3io/v3io-tsdb/releases/54322168","Warn: release artifact v0.13.0 not signed: https://api.github.com/repos/v3io/v3io-tsdb/releases/53077557","Warn: release artifact v0.15.0 does not have provenance: https://api.github.com/repos/v3io/v3io-tsdb/releases/239943124","Warn: release artifact v0.14.1 does not have provenance: https://api.github.com/repos/v3io/v3io-tsdb/releases/91382550","Warn: release artifact v0.14.0 does not have provenance: https://api.github.com/repos/v3io/v3io-tsdb/releases/90836073","Warn: release artifact v0.13.1 does not have provenance: https://api.github.com/repos/v3io/v3io-tsdb/releases/54322168","Warn: release artifact v0.13.0 does not have provenance: https://api.github.com/repos/v3io/v3io-tsdb/releases/53077557"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'development'","Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch 'v0.9.12-8-x'","Warn: branch protection not enabled for branch 'v0.9.x'","Warn: branch protection not enabled for branch 'v0.9.x_disable_trigger'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T20:19:48.347Z","repository_id":32062823,"created_at":"2025-08-24T20:19:48.347Z","updated_at":"2025-08-24T20:19:48.347Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28819180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:44:20.126Z","status":"ssl_error","status_checked_at":"2026-01-27T18:44:09.161Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iguazio","kubernetes","nuclio","prometheus","tsdb"],"created_at":"2026-01-27T19:17:59.222Z","updated_at":"2026-01-27T19:18:00.041Z","avatar_url":"https://github.com/v3io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis Build Status](https://travis-ci.org/v3io/v3io-tsdb.svg?branch=master)](https://travis-ci.org/v3io/v3io-tsdb)\n[![GH Build Status](https://github.com/v3io/v3io-tsdb/workflows/CI/badge.svg)](https://github.com/v3io/v3io-tsdb/actions)\n\n# V3IO-TSDB\nIguazio API lib for time-series DB access and Prometheus TSDB storage driver. \n\n\u003e Note: This project is still under development, it requires the latest 1.7 release of iguazio DB (with Blob functions)\n\n## Overview\nIguazio provides a real-time flexible document database engine which accelerates popular BigData and open-source \nframeworks such as Spark and Presto, as well as provide AWS compatible data APIs (DynamoDB, Kinesis, S3). \n\nIguazio DB engine runs at the speed of in-memory databases, but uses lower cost and higher density (NVMe) Flash, it has \na unique low-level design with highly parallel processing and OS bypass which treats Flash as async memory pages. \n\nIguazio DB low-level APIs (v3io) has rich API semantics and multiple indexing types, those allow it to run multiple\nworkloads and processing engines on exactly the same data, and consistently read/write the data in different tools.\n\nThis project uses v3io semantics (row \u0026 col layouts, arrays, random \u0026 sequential indexes, etc.) to provide extremely \nfast and scalable Time Series database engine which can be accessed simultaneously by multiple engines and APIs, such as:\n- [Prometheus](https://prometheus.io/) Time Series DB (for metrics scraping \u0026 queries)\n- [nuclio](https://github.com/nuclio/nuclio) serverless functions (for real-time ingestion, stream processing or queries) \n- Iguazio DynamoDB API (with extensions) \n- Apache Presto \u0026 Spark (future item, for SQL \u0026 AI)\n- Built-in CLI (tsdbctl) for DB creation, ingestion, and queries \n\n[nuclio](https://github.com/nuclio/nuclio) supports HTTP and a large variety of streaming/triggering options (Kafka, Kinesis\n, Azure event-hub, RabbitMQ, NATS, Iguazio streams, MQTT, Cron tasks), it provides automatic deployment and auto-scaling \nenabling ingestion from variety of sources at endless scalability. using nuclio functions can be customized to pre-process \nincoming data e.g. examine metric data, alert, convert formats, etc.  \n\n\u003cbr\u003e\n\n![architecture](timeseries.png)\n\u003cbr\u003e\n\n## Architecture\nThe solution stores the raw data in highly compressed column chunks (using Gorilla/XOR compression variation), with one \nchunk for every n hours (1hr default), queries will only retrieve and decompress the specific columns based on the \nrequested time range. \n\nUsers can define pre-aggregates (count, avg, sum, min, max, stddev, stdvar, last, rate) which use v3io update expressions and store\ndata consistently in arrays per user defined intervals (RollupMin) and/or dimensions (labels). \n\n![data layout](dataorg.png)\n\nHigh-resolution queries will detect the pre-aggregates automatically and selectively access the array ranges \n(skip chunk retrieval, decompression, and aggregation) which significantly accelerate searches and provide real-time \nresponse. an extension supports overlapping aggregates (retrieve last 1hr, 6h, 12hr, 24hr stats in a single request), \nthis is currently not possible via the standard Prometheus TSDB API.  \n\nThe data can be partitioned to multiple tables (e.g. one per week) or use a cyclic table (goes back to the first chunk after\n it reached the end), multiple tables are stored in a hierarchy under the specified path. \n \nMetric names and labels are stored in search optimized keys and string attributes. Iguazio DB engine can run full \ndimension scan (searches) in the rate of millions of metrics per second, or use selective range based queries to access \na specific metric family. \n\nThe use of v3io random access keys (Hash based) allow real-time sample data ingestion/retrieval and stream processing. \n\nTo maintain high-performance over low-speed connections we implement auto IO throttling, if the link is slow multiple \nsamples will be pushed in a single operation, users can configure the maximum allowed batch (trade efficiency with \nconsistency). IO is done using multiple parallel connections/workers enabling maximum throughput regardless of the \nlink latency.       \n\n## How To Use  \n\nThe code is separated to Prometheus compliant adapter in [/promtsdb](promtsdb) and more generic/advanced adapter in \n[/pkg/tsdb](pkg/tsdb), you should use the latter for custom functions and code. See a full usage example in \n[v3iotsdb_test.go](/pkg/tsdb/v3iotsdb_test.go), both have similar semantics.\n\nFor Prometheus you would need to use the fork found in `https://github.com/v3io/prometheus`, it already loads this\nlibrary, you would need to place a `v3io-tsdb-config.yaml` file with relevant configuration in the same folder as the Prometheus\nexecutable (see details on configurations below).\n\nA developer using this library should first create a TSDB, this can be done using the CLI or an API call (`CreateTSDB`) \nwhich builds the TSDB metadata in the DB. To use the DB you should create an Adapter using the method `NewV3ioAdapter()`\n, with the adapter he can create an `Appender` for adding samples or `Querier` for querying the database and retrieving \na set of metrics or aggregates, see the following sections for details.\n\nA user can run the CLI to add (append) or query the DB, to use the CLI, build the code under [tsdbctl](cmd/tsdbctl), \nit has built-in help, see the following add/query examples:\n\n```\n\t# create a DB with expected ingestion rate of one sample per second and some aggregates (at 30 min interval)\n\t# and cross-label aggregates for \"host\" \n\ttsdbctl create -t \u003ctable\u003e --ingestion-rate 1/s -a count,sum,max -i 30m -l label1\n\n\t# display DB info with metric names (types) \n\ttsdbctl info -t \u003ctable\u003e -n\n\t\n\t# append a sample (73.2) to the specified metric type (cpu) + labels at the current time\n\ttsdbctl add -t \u003ctable\u003e cpu os=win,node=xyz123 -d 73.2\n\t\n\t# display all the CPU metrics for win servers from the last hours, in CSV format \n\ttsdbctl query -t \u003ctable\u003e cpu -f \"os=='win'\" -l 1h -o csv\n\t\n```\n\nFor use with nuclio function you can see function example under [\\nuclio](examples/nuclio)\n\n## API Walkthrough \n\n### Creating and Configuring a TSDB Adapter \n\nThe first step is to create a TSDB, this is done only once per TSDB and generates the required metadata and configuration\nsuch as partitioning strategy, retention, aggregates, etc. this can be done via the CLI or a function call.\n\n```go\n\t// Load v3io connection/path details (see YAML below)\n\tv3iocfg, err := config.GetOrLoadFromFile(\"v3io-tsdb-config.yaml\")\n\tif err != nil {\n\t\t// TODO: handle error\n\t}\n\n\t// Specify the default DB configuration (can be modified per partition)\n\tsamplesIngestionRate = \"1/s\"\n\taggregationGranularity = \"1h\"\n\taggregatesList = \"scount,avg,min,max\"\n\tcrossLabel = \"label1,label2;label3\"\n\tschema, err := schema.NewSchema(v3iocfg, samplesIngestionRate, aggregationGranularity, aggregatesList, crossLabel)\n\tif err != nil {\n\t\t// TODO: handle error\n\t}\n\t\n\treturn tsdb.CreateTSDB(v3iocfg, schema)\n```\n\n\u003e If you plan on using pre-aggregation to speed aggregate queries you should specify the `Rollups` (function list) and \n`RollupMin` (bucket time in minutes) parameters, the supported aggregation functions are: count, sum, avg, min, max, \nstddev, stdvar.\n\nIn order to use the TSDB we need to create an adapter, the `NewV3ioAdapter` function accepts 3\nparameters: the configuration structure, v3io data container object and logger object. The last 2 are optional, in case\nyou already have container and logger (when using nuclio data bindings).\n\nConfiguration is specified in a YAML or JSON format, and can be read from a file using `config.GetOrLoadFromFile(path string)` \nor can be loaded from a local buffer using `config.GetOrLoadFromData(data []byte)`.\nYou can see details on the configuration options in the V3IO TSDB [**config.go**](pkg/config/config.go) source file.\nA template configuration file is found at **examples/v3io-tsdb-config.yaml.template**.\nYou can use it as a reference for creating your own TSDB configuration file.\nFor example:\n\n```yaml\nwebApiEndpoint: \"192.168.1.100:8081\"\ncontainer: \"tsdb\"\nusername: \"johnd\"\npassword: \"OpenSesame\"\n```\n\nFollowing is an example of code for creating an adapter:\n\n```go\n\t// create configuration object from file\n\tcfg, err := config.GetOrLoadFromFile(\"v3io-tsdb-config.yaml\")\n\tif err != nil {\n\t\t// TODO: handle error\n\t}\n\n\t// create and start a new TSDB adapter \n\tadapter, err := tsdb.NewV3ioAdapter(cfg, nil, nil)\n\tif err != nil {\n\t\t// TODO: handle error\n\t}\n```\n\n### Creating and using an Appender (ingest metrics)\n\nThe `Appender` interface is used to ingest metrics data, there are two functions for it: `Add` and `AddFast` which can be\nafter we used Add (using the refID returned by Add) to reduce some lookup/hash overhead.\n\nExample:\n\n```go\n\t// create an Appender interface \n\tappender, err := adapter.Appender()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// create metrics labels, `__name__` label specify the metric type (e.g. cpu, temperature, ..)\n\t// the other labels can be used in searches (filtering or grouping) or aggregations\n\t// use utils.LabelsFromStrings(s ...string) for string list input or utils.LabelsFromMap(m map[string]string) for map input\n\tlset := utils.LabelsFromStrings(\"__name__\",\"http_req\", \"method\", \"post\")\n\n\t// Add a sample with current time (in milisec) and the value of 7.9\n\tref, err := appender.Add(lset, time.Now().Unix * 1000, 7.9)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Add a second sample using AddFast and the refID from Add\n\terr := appender.AddFast(nil, ref, time.Now().Unix * 1000 + 1000, 8.3)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n```\n\n### Creating and using a Querier (read metrics and aggregates) \n\nThe `Querier` interface is used to query the database and return one or more metrics, we first need to create a `Querier`,\nonce we did we can use `Select()` which will return a list of series (as an iterator object).\n\nEvery returned series have two interfaces, `Labels()` which returns the series or aggregate labels, and `Iterator()`\nwhich returns an iterator over the series or aggregate values.\n\nThe `Select()` call accepts a `SelectParams` parameter which has the following properties:\n* From (int64) - a timestamp in milliseconds specifying the start time of the query\n* To (int64) - a timestamp in milliseconds specifying the end time of the query\n* Name (string) - optional, comma separated metric types (e.g. cpu, memory, ..), specifying it accelerate performance (use range queries)   \n* Step (int64) - optional, the step interval in milliseconds used for the aggregation functions or for downsampling raw data\n* Functions (string) - optional, a comma separated list of aggregation functions e.g. `\"count,sum,avg,stddev\"` \n* Filter (string) - optional, V3IO GetItems filter expression for selecting the desired metrics e.g. `_name=='http_req'`\n* GroupBy (string) - optional, a comma seperated list of labels to group the results by e.g. `\"method\"`\n* RequestedColumns ([]RequestedColumn) - optional, as an alternative to `Name` \u0026 `Function` a user can pass a list of `RequestedColumn` object that specify which metrics and aggregates to query.\n Using this API it is possible to query several metrics in the same query. \n\n\nUsing `Functions` and `Step` is optional, use it only when you are interested in pre-aggregation and the step is \u003e\u003e than \nthe sampling interval (and preferably equal or greater than the partition RollupMin interval).  \nThere are two types of aggregates:\n* aggregates over time - aggregates the data into buckets over a period of time. This will result in a series for every unique label set per aggregate.\n* aggregates across series - aggregates the data for all the different label sets into one series per aggregate. Add an `_all` suffix to the aggregate name to use this kind of aggregation. \n\nIn both cases, the `Aggregate` label will be added to that series with the function name.\nBut, a user can use an aggregate over time **or** aggregate across series but not both in the same query.\n\ncreating a querier:\n\n```go\n\tqry, err := adapter.QuerierV2()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n```\n\nSimple select example (no aggregates):\n```go\n    params := \u0026pquerier.SelectParams{Name: \"http_req\",\n                                     Filter: \"method=='post'\",\n                                     From: minTime,\n                                     To: maxTime}\n    set, err := qry.Select(params)\n```\n\nSelect using aggregates:\n\n```go\n    params := \u0026pquerier.SelectParams{Name: \"http_req\",\n                                     Filter: \"method=='post'\",\n                                     From: minTime,\n                                     To: maxTime,\n                                     Step: 1000*3600,\n                                     Functions: \"count,avg,sum,max\"}\n    set, err := qry.Select(params)\n```\n\nSelect using RequestedColumns:\n\n```go\n    wantedColumns: []pquerier.RequestedColumn{{Metric: \"http_req\", Function: \"avg\"},\n                                              {Metric: \"http_req\", Function: \"count\"},\n                                              {Metric: \"http_req\", Function: \"max\"},\n                                              {Metric: \"tcp_req\", Function: \"avg\"}}\n    params := \u0026pquerier.SelectParams{RequestedColumns: wantedColumns\n                                     Filter: \"method=='post'\",\n                                     From: minTime,\n                                     To: maxTime,\n                                     Step: 1000*3600}\n    set, err := qry.Select(params)\n```\n\nOnce we obtain a set using one of the methods above we can iterate over the set and the individual series in the following way:\n\n```go\n\tfor set.Next() {\n\t\tif set.Err() != nil {\n\t\t\tpanic(set.Err())\n\t\t}\n\n\t\tseries := set.At()\n\t\tfmt.Println(\"\\nLables:\", series.Labels())\n\t\titer := series.Iterator()\n\t\tfor iter.Next() {\n\t\t\tif iter.Err() != nil {\n\t\t\t\tpanic(iter.Err())\n\t\t\t}\n\n\t\t\tt, v := iter.At()\n\t\t\tfmt.Printf(\"t=%d,v=%.2f \", t, v)\n\t\t}\n\t\tfmt.Println()\n\t}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv3io%2Fv3io-tsdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv3io%2Fv3io-tsdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv3io%2Fv3io-tsdb/lists"}