curl --request GET \
--url https://developer.synq.io/api/sql-insights/v1/column-usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://developer.synq.io/api/sql-insights/v1/column-usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://developer.synq.io/api/sql-insights/v1/column-usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://developer.synq.io/api/sql-insights/v1/column-usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developer.synq.io/api/sql-insights/v1/column-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://developer.synq.io/api/sql-insights/v1/column-usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/sql-insights/v1/column-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"patterns": [
{
"column": "<string>",
"kind": "COLUMN_USAGE_KIND_UNSPECIFIED",
"function": "AGGREGATE_FUNCTION_UNSPECIFIED",
"nativeFunction": "<string>",
"operator": "FILTER_OPERATOR_UNSPECIFIED",
"evidenceKinds": [
"JOIN_EVIDENCE_KIND_UNSPECIFIED"
],
"sources": [
{
"entityId": "<string>",
"statementIndex": 123,
"transformed": true,
"literal": true
}
],
"queryLog": {
"queries": 123,
"transformedQueries": 123,
"distinctLogins": 123,
"firstHour": "2023-01-15T01:30:15.01Z",
"lastHour": "2023-01-15T01:30:15.01Z",
"issuers": [
{
"platform": "<string>",
"entityId": "<string>",
"queries": 123,
"distinctLogins": 123,
"kind": "JOIN_ISSUER_KIND_UNSPECIFIED"
}
],
"sampleQueryId": "<string>",
"literalQueries": 123
}
}
],
"queryLogCoveredHours": 123,
"queryLogLeftOut": {
"coalesceQualityQueries": 123,
"coalesceLogins": 123,
"serviceAccounts": 123,
"checks": 123
},
"entityIds": [
"<string>"
]
}ListColumnUsage
List how the columns of a table, or one of them, are used: which columns the SQL of tables, views and models in the workspace aggregate and with which function, group by, and filter on and with which comparison, and optionally how often queries in the warehouse’s query history did the same in a window.
The requested entity is taken together with every entity that is the same
object, as for ListJoinPatterns.
curl --request GET \
--url https://developer.synq.io/api/sql-insights/v1/column-usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://developer.synq.io/api/sql-insights/v1/column-usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://developer.synq.io/api/sql-insights/v1/column-usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://developer.synq.io/api/sql-insights/v1/column-usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developer.synq.io/api/sql-insights/v1/column-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://developer.synq.io/api/sql-insights/v1/column-usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/sql-insights/v1/column-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"patterns": [
{
"column": "<string>",
"kind": "COLUMN_USAGE_KIND_UNSPECIFIED",
"function": "AGGREGATE_FUNCTION_UNSPECIFIED",
"nativeFunction": "<string>",
"operator": "FILTER_OPERATOR_UNSPECIFIED",
"evidenceKinds": [
"JOIN_EVIDENCE_KIND_UNSPECIFIED"
],
"sources": [
{
"entityId": "<string>",
"statementIndex": 123,
"transformed": true,
"literal": true
}
],
"queryLog": {
"queries": 123,
"transformedQueries": 123,
"distinctLogins": 123,
"firstHour": "2023-01-15T01:30:15.01Z",
"lastHour": "2023-01-15T01:30:15.01Z",
"issuers": [
{
"platform": "<string>",
"entityId": "<string>",
"queries": 123,
"distinctLogins": 123,
"kind": "JOIN_ISSUER_KIND_UNSPECIFIED"
}
],
"sampleQueryId": "<string>",
"literalQueries": 123
}
}
],
"queryLogCoveredHours": 123,
"queryLogLeftOut": {
"coalesceQualityQueries": 123,
"coalesceLogins": 123,
"serviceAccounts": 123,
"checks": 123
},
"entityIds": [
"<string>"
]
}Authorizations
Query Parameters
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive.
Response
Success
ListColumnUsageResponse lists the column usage of the requested entity.