curl --request POST \
--url https://api.example.com/api/semantic-models/match \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_name": "<string>",
"model_description": "",
"desired_columns": [],
"domain_name": "<string>",
"domain_urn": "<string>",
"include_tables": [
"<string>"
],
"exclude_tables": [
"<string>"
],
"target_catalog": "iceberg",
"target_schema": "<string>"
}
'import requests
url = "https://api.example.com/api/semantic-models/match"
payload = {
"model_name": "<string>",
"model_description": "",
"desired_columns": [],
"domain_name": "<string>",
"domain_urn": "<string>",
"include_tables": ["<string>"],
"exclude_tables": ["<string>"],
"target_catalog": "iceberg",
"target_schema": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
model_description: '',
desired_columns: [],
domain_name: '<string>',
domain_urn: '<string>',
include_tables: ['<string>'],
exclude_tables: ['<string>'],
target_catalog: 'iceberg',
target_schema: '<string>'
})
};
fetch('https://api.example.com/api/semantic-models/match', 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://api.example.com/api/semantic-models/match",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model_name' => '<string>',
'model_description' => '',
'desired_columns' => [
],
'domain_name' => '<string>',
'domain_urn' => '<string>',
'include_tables' => [
'<string>'
],
'exclude_tables' => [
'<string>'
],
'target_catalog' => 'iceberg',
'target_schema' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/semantic-models/match"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"model_description\": \"\",\n \"desired_columns\": [],\n \"domain_name\": \"<string>\",\n \"domain_urn\": \"<string>\",\n \"include_tables\": [\n \"<string>\"\n ],\n \"exclude_tables\": [\n \"<string>\"\n ],\n \"target_catalog\": \"iceberg\",\n \"target_schema\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/semantic-models/match")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"model_description\": \"\",\n \"desired_columns\": [],\n \"domain_name\": \"<string>\",\n \"domain_urn\": \"<string>\",\n \"include_tables\": [\n \"<string>\"\n ],\n \"exclude_tables\": [\n \"<string>\"\n ],\n \"target_catalog\": \"iceberg\",\n \"target_schema\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/semantic-models/match")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"model_description\": \"\",\n \"desired_columns\": [],\n \"domain_name\": \"<string>\",\n \"domain_urn\": \"<string>\",\n \"include_tables\": [\n \"<string>\"\n ],\n \"exclude_tables\": [\n \"<string>\"\n ],\n \"target_catalog\": \"iceberg\",\n \"target_schema\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_name": "<string>",
"model_description": "<string>",
"source_tables": [],
"columns": [],
"generated_sql": "",
"overall_confidence": 0,
"ai_reasoning": "",
"warnings": []
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Match model to catalog
Match a model definition against catalog metadata, using AI to find the best matching source tables and columns in a domain.
You can use this during manual model creation to auto-fill source tables, columns, and SQL from the catalog.
Required roles: nx1_semantic_modeller or nx1_semantic_admin
curl --request POST \
--url https://api.example.com/api/semantic-models/match \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_name": "<string>",
"model_description": "",
"desired_columns": [],
"domain_name": "<string>",
"domain_urn": "<string>",
"include_tables": [
"<string>"
],
"exclude_tables": [
"<string>"
],
"target_catalog": "iceberg",
"target_schema": "<string>"
}
'import requests
url = "https://api.example.com/api/semantic-models/match"
payload = {
"model_name": "<string>",
"model_description": "",
"desired_columns": [],
"domain_name": "<string>",
"domain_urn": "<string>",
"include_tables": ["<string>"],
"exclude_tables": ["<string>"],
"target_catalog": "iceberg",
"target_schema": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
model_description: '',
desired_columns: [],
domain_name: '<string>',
domain_urn: '<string>',
include_tables: ['<string>'],
exclude_tables: ['<string>'],
target_catalog: 'iceberg',
target_schema: '<string>'
})
};
fetch('https://api.example.com/api/semantic-models/match', 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://api.example.com/api/semantic-models/match",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model_name' => '<string>',
'model_description' => '',
'desired_columns' => [
],
'domain_name' => '<string>',
'domain_urn' => '<string>',
'include_tables' => [
'<string>'
],
'exclude_tables' => [
'<string>'
],
'target_catalog' => 'iceberg',
'target_schema' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/semantic-models/match"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"model_description\": \"\",\n \"desired_columns\": [],\n \"domain_name\": \"<string>\",\n \"domain_urn\": \"<string>\",\n \"include_tables\": [\n \"<string>\"\n ],\n \"exclude_tables\": [\n \"<string>\"\n ],\n \"target_catalog\": \"iceberg\",\n \"target_schema\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/semantic-models/match")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"model_description\": \"\",\n \"desired_columns\": [],\n \"domain_name\": \"<string>\",\n \"domain_urn\": \"<string>\",\n \"include_tables\": [\n \"<string>\"\n ],\n \"exclude_tables\": [\n \"<string>\"\n ],\n \"target_catalog\": \"iceberg\",\n \"target_schema\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/semantic-models/match")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"model_description\": \"\",\n \"desired_columns\": [],\n \"domain_name\": \"<string>\",\n \"domain_urn\": \"<string>\",\n \"include_tables\": [\n \"<string>\"\n ],\n \"exclude_tables\": [\n \"<string>\"\n ],\n \"target_catalog\": \"iceberg\",\n \"target_schema\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_name": "<string>",
"model_description": "<string>",
"source_tables": [],
"columns": [],
"generated_sql": "",
"overall_confidence": 0,
"ai_reasoning": "",
"warnings": []
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Body
Request to match a model definition against catalog metadata.
Name of the model you're defining.
What the model should represent.
Desired columns/metrics the model should expose.
Show child attributes
Show child attributes
Domain name. Either domain_name or domain_urn required.
Domain URN. Either domain_name or domain_urn required.
Only consider these tables.
Exclude these tables from consideration.
Target Trino catalog.
Target Trino schema.
Response
Matched model with source tables and columns
Response from catalog matching.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
AI-generated SQL for the view.
Overall match confidence, 0-1.
AI explanation of the matching strategy.
Any warnings about the match.
Was this page helpful?

