Match model to catalog
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": [
{
"qualified_name": "<string>",
"relevance_score": 0,
"reasoning": "",
"columns_used": 0
}
],
"columns": [
{
"column_name": "<string>",
"business_name": "<string>",
"source_table": "<string>",
"source_column": "<string>",
"data_type": "<string>",
"description": "",
"is_key": false,
"is_dimension": false,
"is_measure": false,
"is_nullable": true,
"transformation_sql": "<string>",
"confidence": 0,
"match_reasoning": ""
}
],
"generated_sql": "",
"overall_confidence": 0,
"ai_reasoning": "",
"warnings": []
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Semantic models
Match model to catalog
Match a model definition against catalog metadata. AI finds 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
POST
/
api
/
semantic-models
/
match
Match model to catalog
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": [
{
"qualified_name": "<string>",
"relevance_score": 0,
"reasoning": "",
"columns_used": 0
}
],
"columns": [
{
"column_name": "<string>",
"business_name": "<string>",
"source_table": "<string>",
"source_column": "<string>",
"data_type": "<string>",
"description": "",
"is_key": false,
"is_dimension": false,
"is_measure": false,
"is_nullable": true,
"transformation_sql": "<string>",
"confidence": 0,
"match_reasoning": ""
}
],
"generated_sql": "",
"overall_confidence": 0,
"ai_reasoning": "",
"warnings": []
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
Headers
Body
application/json
Request to match a model definition against catalog metadata.
Response
Matched model with source tables and columns
Response from catalog matching.
Was this page helpful?

