{"openapi":"3.1.0","info":{"title":"Upriver API","description":"API for Upriver","version":"6.29.39"},"paths":{"/api/v1/datasource/new":{"post":{"tags":["datasource@v1"],"summary":"Create Datasource","operationId":"create_datasource_api_v1_datasource_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewDatasource"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewDatasourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/roots":{"get":{"tags":["datasource@v1"],"summary":"Get Root Datasources","operationId":"get_root_datasources_api_v1_datasource_roots_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Datasource"},"type":"array","title":"Response Get Root Datasources Api V1 Datasource Roots Get"}}}}}}},"/api/v1/datasource/roots/lookup":{"get":{"tags":["datasource@v1"],"summary":"Lookup Root Datasource","operationId":"lookup_root_datasource_api_v1_datasource_roots_lookup_get","parameters":[{"name":"name_or_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Or Id"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Datasource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource","operationId":"get_datasource_api_v1_datasource__datasource_id__get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Datasource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["datasource@v1"],"summary":"Delete Datasource","description":"Deletes a datasource with the given id.\n:param datasource_id: The id of the datasource to delete.\n:raises requests.HTTPError: If the request fails.","operationId":"delete_datasource_api_v1_datasource__datasource_id__delete","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/children":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource Children","operationId":"get_datasource_children_api_v1_datasource__datasource_id__children_get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasourceId"},"title":"Response Get Datasource Children Api V1 Datasource  Datasource Id  Children Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/all":{"get":{"tags":["datasource@v1"],"summary":"Get All Datasources","operationId":"get_all_datasources_api_v1_datasource_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Datasource"},"type":"array","title":"Response Get All Datasources Api V1 Datasource All Get"}}}}}}},"/api/v1/datasource/{datasource_id}/settings/get":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource Settings","operationId":"get_datasource_settings_api_v1_datasource__datasource_id__settings_get_get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/status":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource Status","operationId":"get_datasource_status_api_v1_datasource__datasource_id__status_get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/run":{"post":{"tags":["datasource@v1"],"summary":"Run Datasource","operationId":"run_datasource_api_v1_datasource__datasource_id__run_post","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Time"}},{"name":"run_time","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Run Time"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/run/{run_id}/status":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource Run Status","operationId":"get_datasource_run_status_api_v1_datasource__datasource_id__run__run_id__status_get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/datasource_progress":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource Run Progress","description":"Progress of the datasource's latest run as tracked by our store, independent of the orchestrator run.\n\nUnlike ``/run/{run_id}/status`` (which inspects the Databricks/MWAA run lifecycle), this reports how\nfar each leaf datasource has advanced in its latest run. It's the signal to wait on before a\nprofile/version diff: ``contracts_ready`` becomes True once every leaf has a generated contract.","operationId":"get_datasource_run_progress_api_v1_datasource__datasource_id__datasource_progress_get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceRunProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/schema":{"get":{"tags":["datasource@v1"],"summary":"Get Datasource Schema External","operationId":"get_datasource_schema_external_api_v1_datasource__datasource_id__schema_get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SchemaResponse"},{"type":"null"}],"title":"Response Get Datasource Schema External Api V1 Datasource  Datasource Id  Schema Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/add_schema/{sync}":{"post":{"tags":["datasource@v1"],"summary":"Add Schema","operationId":"add_schema_api_v1_datasource__datasource_id__add_schema__sync__post","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}},{"name":"sync","in":"path","required":true,"schema":{"type":"boolean","title":"Sync"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_schema_api_v1_datasource__datasource_id__add_schema__sync__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/delete_schema":{"delete":{"tags":["datasource@v1"],"summary":"Delete Schema","operationId":"delete_schema_api_v1_datasource__datasource_id__delete_schema_delete","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/settings/update/{sync}":{"post":{"tags":["datasource@v1"],"summary":"Update Datasource From Sdk","operationId":"update_datasource_from_sdk_api_v1_datasource__datasource_id__settings_update__sync__post","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}},{"name":"sync","in":"path","required":true,"schema":{"type":"boolean","title":"Sync"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceSettings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/settings/patch/{sync}":{"post":{"tags":["datasource@v1"],"summary":"Patch Datasource From Sdk","operationId":"patch_datasource_from_sdk_api_v1_datasource__datasource_id__settings_patch__sync__post","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}},{"name":"sync","in":"path","required":true,"schema":{"type":"boolean","title":"Sync"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceSettings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/set_metadata_expectations/{sync}":{"post":{"tags":["datasource@v1"],"summary":"Add Metadata User Expectations","operationId":"add_metadata_user_expectations_api_v1_datasource__datasource_id__set_metadata_expectations__sync__post","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}},{"name":"sync","in":"path","required":true,"schema":{"type":"boolean","title":"Sync"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasourceMetadataExpectations"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/{datasource_id}/force_running_state":{"post":{"tags":["datasource@v1"],"summary":"Fast Forward Datasource","operationId":"fast_forward_datasource_api_v1_datasource__datasource_id__force_running_state_post","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/pause":{"post":{"tags":["datasource@v1"],"summary":"Pause Datasources","description":"Pauses the given datasources and their descendants; returns the ids that changed status.","operationId":"pause_datasources_api_v1_datasource_pause_post","requestBody":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Datasource Ids"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Pause Datasources Api V1 Datasource Pause Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/datasource/resume":{"post":{"tags":["datasource@v1"],"summary":"Resume Datasources","description":"Resumes the given paused datasources and their descendants; returns the ids that changed status.","operationId":"resume_datasources_api_v1_datasource_resume_post","requestBody":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Datasource Ids"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Resume Datasources Api V1 Datasource Resume Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tag/all":{"get":{"tags":["tag@v1"],"summary":"Get All Tags","operationId":"get_all_tags_api_v1_tag_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Response Get All Tags Api V1 Tag All Get"}}}}}}},"/api/v1/tag/new":{"post":{"tags":["tag@v1"],"summary":"Create Tag","operationId":"create_tag_api_v1_tag_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tag/{tag_name}":{"get":{"tags":["tag@v1"],"summary":"Get Tag","operationId":"get_tag_api_v1_tag__tag_name__get","parameters":[{"name":"tag_name","in":"path","required":true,"schema":{"type":"string","title":"Tag Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tag@v1"],"summary":"Update Tag","operationId":"update_tag_api_v1_tag__tag_name__post","parameters":[{"name":"tag_name","in":"path","required":true,"schema":{"type":"string","title":"Tag Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tag@v1"],"summary":"Delete Tag","operationId":"delete_tag_api_v1_tag__tag_name__delete","parameters":[{"name":"tag_name","in":"path","required":true,"schema":{"type":"string","title":"Tag Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/accesskey/exchange":{"get":{"tags":["auth@v1"],"summary":"Exchange Access Key","operationId":"exchange_access_key_api_v1_auth_accesskey_exchange_get","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserToken"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Exchange Access Key Api V1 Auth Accesskey Exchange Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/data_integration/get/{data_integration_id}":{"get":{"tags":["data_integration@v1"],"summary":"Get Data Integration","operationId":"get_data_integration_api_v1_data_integration_get__data_integration_id__get","parameters":[{"name":"data_integration_id","in":"path","required":true,"schema":{"type":"integer","title":"Data Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AthenaIntegration"},{"$ref":"#/components/schemas/BigQueryIntegration"},{"$ref":"#/components/schemas/RedshiftIntegration"},{"$ref":"#/components/schemas/DuckDBIntegration"},{"$ref":"#/components/schemas/TrinoIntegration"}],"discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaIntegration","big_query":"#/components/schemas/BigQueryIntegration","redshift":"#/components/schemas/RedshiftIntegration","duckdb":"#/components/schemas/DuckDBIntegration","trino":"#/components/schemas/TrinoIntegration"}},"title":"Response Get Data Integration Api V1 Data Integration Get  Data Integration Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/data_integration/get_all":{"get":{"tags":["data_integration@v1"],"summary":"Get All Data Integrations","operationId":"get_all_data_integrations_api_v1_data_integration_get_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"oneOf":[{"$ref":"#/components/schemas/AthenaIntegration"},{"$ref":"#/components/schemas/BigQueryIntegration"},{"$ref":"#/components/schemas/RedshiftIntegration"},{"$ref":"#/components/schemas/DuckDBIntegration"},{"$ref":"#/components/schemas/TrinoIntegration"}],"discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaIntegration","big_query":"#/components/schemas/BigQueryIntegration","redshift":"#/components/schemas/RedshiftIntegration","duckdb":"#/components/schemas/DuckDBIntegration","trino":"#/components/schemas/TrinoIntegration"}}},"type":"array","title":"Response Get All Data Integrations Api V1 Data Integration Get All Get"}}}}}}},"/api/v1/incident/incidents/{start_timestamp}/{end_timestamp}":{"get":{"tags":["incident@v1"],"summary":"Get Incidents By Time","description":"List incidents in a creation-time range (milliseconds since epoch, UTC).\nSame data as the incidents UI list for the selected date range.\n\nWhen include_events is true (default), each incident includes nested event payloads\n(same detail as get incident by id). Set to false for a lean list response.","operationId":"get_incidents_by_time_api_v1_incident_incidents__start_timestamp___end_timestamp__get","parameters":[{"name":"start_timestamp","in":"path","required":true,"schema":{"type":"number","title":"Start Timestamp"}},{"name":"end_timestamp","in":"path","required":true,"schema":{"type":"number","title":"End Timestamp"}},{"name":"include_events","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Events"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Incident"},"title":"Response Get Incidents By Time Api V1 Incident Incidents  Start Timestamp   End Timestamp  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/incident/{incident_id}":{"get":{"tags":["incident@v1"],"summary":"Get Incident By Id","description":"Get one incident by id, including nested events.\nSame data as the incidents UI detail page.","operationId":"get_incident_by_id_api_v1_incident__incident_id__get","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"integer","title":"Incident Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profile_diff/times/{datasource_id}":{"get":{"tags":["profile_diff@v1"],"summary":"Get Profile Diff Run Times","description":"List the available profile (contract) run timestamps for a datasource.\nUse these to pick the times to compare in a profile diff.","operationId":"get_profile_diff_run_times_api_v1_profile_diff_times__datasource_id__get","parameters":[{"name":"datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Datasource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"date-time"},"title":"Response Get Profile Diff Run Times Api V1 Profile Diff Times  Datasource Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profile_diff/datasources/{first_datasource_id}/{second_datasource_id}":{"get":{"tags":["profile_diff@v1"],"summary":"Get Datasources Profile Diff External","description":"Compare the data profiles of two datasources (same data as the data-compare UI).\n\nTimes are milliseconds since epoch (UTC). For each side, if its time is omitted we use\nthat datasource's most recent run time (so omitting both compares the latest run of each,\nand omitting one compares the given run against the other datasource's latest).\n``threshold`` (0-1) controls server-side change detection.","operationId":"get_datasources_profile_diff_external_api_v1_profile_diff_datasources__first_datasource_id___second_datasource_id__get","parameters":[{"name":"first_datasource_id","in":"path","required":true,"schema":{"type":"string","title":"First Datasource Id"}},{"name":"second_datasource_id","in":"path","required":true,"schema":{"type":"string","title":"Second Datasource Id"}},{"name":"first_datasource_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Datasource Time"}},{"name":"second_datasource_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Second Datasource Time"}},{"name":"field_map_1","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Map 1"}},{"name":"field_map_2","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Map 2"}},{"name":"threshold","in":"query","required":false,"schema":{"type":"number","default":0.05,"title":"Threshold"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/snowflake/native-app/register":{"post":{"tags":["snowflake/native-app@v1"],"summary":"Register Snowflake Native App Installation","operationId":"register_snowflake_native_app_installation_api_v1_snowflake_native_app_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnowflakeNativeAppRegisterResponseView"}}}}}}},"/api/v1/snowflake/native-app/queries/next":{"post":{"tags":["snowflake/native-app@v1"],"summary":"Claim Snowflake Native App Query","operationId":"claim_snowflake_native_app_query_api_v1_snowflake_native_app_queries_next_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnowflakeNativeAppNextQueryView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/snowflake/native-app/queries/{query_job_id}/complete":{"post":{"tags":["snowflake/native-app@v1"],"summary":"Complete Snowflake Native App Query","operationId":"complete_snowflake_native_app_query_api_v1_snowflake_native_app_queries__query_job_id__complete_post","parameters":[{"name":"query_job_id","in":"path","required":true,"schema":{"type":"string","title":"Query Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Upriver-Claim-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Upriver-Claim-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnowflakeNativeAppNextQueryView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["oauth_discovery"],"summary":"Protected Resource Metadata","description":"OAuth 2.0 Protected Resource Metadata (RFC 9728) for the internal MCP proxy.","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Protected Resource Metadata  Well Known Oauth Protected Resource Get"}}}}}}},"/.well-known/oauth-protected-resource/upriver-mcp":{"get":{"tags":["oauth_discovery"],"summary":"Agent Mcp Protected Resource Metadata","description":"OAuth 2.0 Protected Resource Metadata (RFC 9728) for the agent MCP server.","operationId":"agent_mcp_protected_resource_metadata__well_known_oauth_protected_resource_upriver_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Agent Mcp Protected Resource Metadata  Well Known Oauth Protected Resource Upriver Mcp Get"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/v1/teams/messages":{"post":{"summary":"Fastapi Handler","operationId":"fastapi_handler_api_internal_v1_teams_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AdditionalFormatSettings":{"properties":{"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delimiter","description":"The delimiter of the data stored in the bucket. Only applicable for CSV format."},"has_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Header","description":"Whether the CSV file has a header row. Only applicable for CSV format."},"skip_blank_lines":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Blank Lines","description":"Whether to skip blank lines in the CSV file. Only applicable for CSV format."}},"type":"object","required":["delimiter","has_header","skip_blank_lines"],"title":"AdditionalFormatSettings"},"AssetMigrationName":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"data_diff_configuration_id":{"type":"integer","title":"Data Diff Configuration Id"},"origin_datasource":{"$ref":"#/components/schemas/DatasourceName"},"target_datasource":{"$ref":"#/components/schemas/DatasourceName"}},"type":"object","required":["id","name","data_diff_configuration_id","origin_datasource","target_datasource"],"title":"AssetMigrationName"},"AthenaConfiguration":{"properties":{"type":{"type":"string","const":"athena","title":"Type","default":"athena"},"data_integration":{"anyOf":[{"$ref":"#/components/schemas/AthenaIntegration"},{"type":"null"}]},"database":{"type":"string","title":"Database"},"table":{"type":"string","title":"Table"}},"type":"object","required":["database","table"],"title":"AthenaConfiguration"},"AthenaIntegration":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","const":"athena","title":"Type","default":"athena"},"name":{"type":"string","title":"Name"},"provisioning_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provisioning Config Id"},"catalog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog"},"workgroup":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workgroup"},"query_results_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Results Location"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"arn_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arn Role"}},"type":"object","required":["id","name"],"title":"AthenaIntegration"},"BigQueryConfiguration":{"properties":{"type":{"type":"string","const":"big_query","title":"Type","default":"big_query"},"data_integration":{"anyOf":[{"$ref":"#/components/schemas/BigQueryIntegration"},{"type":"null"}]},"dataset":{"type":"string","title":"Dataset"},"table":{"type":"string","title":"Table"}},"type":"object","required":["dataset","table"],"title":"BigQueryConfiguration"},"BigQueryIntegration":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","const":"big_query","title":"Type","default":"big_query"},"name":{"type":"string","title":"Name"},"provisioning_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provisioning Config Id"},"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["id","name","project_id"],"title":"BigQueryIntegration"},"Body_add_schema_api_v1_datasource__datasource_id__add_schema__sync__post":{"properties":{"user_defined_schema":{"type":"string","contentMediaType":"application/octet-stream","title":"User Defined Schema"}},"type":"object","required":["user_defined_schema"],"title":"Body_add_schema_api_v1_datasource__datasource_id__add_schema__sync__post"},"DataFormat":{"type":"string","enum":["json","parquet","csv","excel","delta_table","orc","iceberg","hudi"],"title":"DataFormat","description":"The format of the stored data."},"Datasource":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"An optional unique identifier for the datasource defined by the user."},"name":{"type":"string","title":"Name","description":"\n            Name representing the datasource in the data set catalog and other pages, such as\n            incidents and notifications.\n            This name can be modified to provide a more meaningful identifier than the one assigned to\n            the physical storage.\n            "},"owners":{"items":{"type":"string"},"type":"array","title":"Owners","description":"\n            Assign users to a data source by choosing from the list of platform-accessible users.\n            This functionality promotes collaboration by clearly designating responsibility for each data source.\n            When a user is assigned as an owner, they are tagged and notified of any incidents related to\n            their data source, ensuring prompt attention and resolution.\n            "},"data_connection_configuration":{"oneOf":[{"$ref":"#/components/schemas/KinesisConfiguration"},{"$ref":"#/components/schemas/FileSystemConfiguration"},{"$ref":"#/components/schemas/BigQueryConfiguration"},{"$ref":"#/components/schemas/SnowflakeConfiguration"},{"$ref":"#/components/schemas/RedshiftConfiguration"},{"$ref":"#/components/schemas/AthenaConfiguration"},{"$ref":"#/components/schemas/DuckDBConfiguration"},{"$ref":"#/components/schemas/TrinoConfiguration"}],"title":"Data Connection Configuration","discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaConfiguration","big_query":"#/components/schemas/BigQueryConfiguration","duckdb":"#/components/schemas/DuckDBConfiguration","gcs":"#/components/schemas/FileSystemConfiguration","kinesis":"#/components/schemas/KinesisConfiguration","redshift":"#/components/schemas/RedshiftConfiguration","s3":"#/components/schemas/FileSystemConfiguration","snowflake":"#/components/schemas/SnowflakeConfiguration","trino":"#/components/schemas/TrinoConfiguration"}}},"contract_generation_configuration":{"$ref":"#/components/schemas/DatasourceContractGenerationConfiguration"},"incident_configuration":{"$ref":"#/components/schemas/DatasourceIncidentConfiguration"},"pivot_fields":{"items":{"type":"string"},"type":"array","title":"Pivot Fields","description":"\n            Pivot fields used to split the data into different contracts, using the default ``standard``\n            split method (one derived datasource per distinct value). For non-standard split methods\n            (specific / prominent / time / ranges) use ``pivots`` instead. As of this SDK version’s\n            release, Upriver supports a maximum of 2 pivot fields.\n            ","default":[]},"pivots":{"items":{"oneOf":[{"$ref":"#/components/schemas/StandardPivotField"},{"$ref":"#/components/schemas/SpecificPivotField"},{"$ref":"#/components/schemas/ProminentPivotField"},{"$ref":"#/components/schemas/TimePivotField"},{"$ref":"#/components/schemas/RangesPivotField"}],"discriminator":{"propertyName":"split_method","mapping":{"prominent":"#/components/schemas/ProminentPivotField","ranges":"#/components/schemas/RangesPivotField","specific":"#/components/schemas/SpecificPivotField","standard":"#/components/schemas/StandardPivotField","time":"#/components/schemas/TimePivotField"}}},"type":"array","title":"Pivots","description":"\n            Rich pivot field configurations giving full control over how each field is split into\n            derived datasources (standard / specific / prominent / time / ranges). When non-empty, this\n            takes precedence over ``pivot_fields``. Build entries with the ``Pivot`` factory helpers.\n            ","default":[]},"nested_pivots":{"type":"boolean","title":"Nested Pivots","description":"\n            Whether multiple pivot fields are nested (each field splits within the children of the\n            previous one, the default) or flat (every field splits the root independently, producing one\n            level of children per field).\n            ","default":true},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"\n            Tags allows to organize and classify data sources for more efficient management and enhanced\n            access controls.\n            ","default":[]},"is_key_asset":{"type":"boolean","title":"Is Key Asset","description":"If true, the datasource is a key asset.","default":false},"upriver_id":{"type":"string","title":"Upriver Id","description":"The unique identifier of the datasource in Upriver's system."},"status":{"$ref":"#/components/schemas/MonitoringStatus"},"root_id":{"anyOf":[{"$ref":"#/components/schemas/DatasourceId"},{"type":"null"}],"description":"\n            Identifier of parent datasource.\n            "},"children":{"items":{"$ref":"#/components/schemas/DatasourceId"},"type":"array","title":"Children","description":"List of children datasources, if available."}},"type":"object","required":["name","owners","data_connection_configuration","upriver_id","status"],"title":"Datasource"},"DatasourceContractGenerationConfiguration":{"properties":{"update_interval_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Update Interval Minutes","description":"\n            The time in minutes between contract updates.\n            If None, the system will determine and update the interval automatically as needed.\n            "},"sampling_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Sampling Rate","description":"\n            Sampling rate for the data to be used to generate the contract, between 0 and 1.\n            If None, the system will determine and update the sampling rate automatically based on the volume of data.\n            "},"cardinality_threshold":{"type":"integer","title":"Cardinality Threshold","description":"\n            The threshold for the cardinality of a column to be considered a categorical column.\n            If the column has less than cardinality_threshold unique values, it will be considered a categorical column.\n            Categorial columns will generate an exact histogram of the values provided,\n            and monitor both the specific values existence and their distribution.\n            ","default":10},"nullify_empty_strings":{"type":"boolean","title":"Nullify Empty Strings","description":"\n            If true, Upriver will consider an empty string as a null, reducing completeness and not affecting the\n            distribution of the lengths of the field.\n            ","default":false},"nullify_empty_arrays":{"type":"boolean","title":"Nullify Empty Arrays","description":"\n            If true, Upriver will consider an empty array as a null, reducing completeness and not affecting the\n            distribution of the lengths of the field.\n            ","default":false},"only_analyze_updated_data":{"type":"boolean","title":"Only Analyze Updated Data","description":"\n            If true, each run only analyzes the data added since the previous run and monitors freshness.\n            If false, each run analyzes the full dataset.\n            ","default":true},"filter":{"additionalProperties":{"$ref":"#/components/schemas/Filter"},"type":"object","title":"Filter","description":"\n            A map from field name (case sensitive) to the Filter to be applied to the field.\n            Only rows where all the fields match filter value will be considered for the contract.\n            "},"staleness_threshold_days":{"type":"integer","exclusiveMinimum":0.0,"title":"Staleness Threshold Days","description":"\n            The amount of days that no new data can be found before the datasource is considered stale.\n            ","default":7},"timestamp_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp Column","description":"\n            The name of the column in the data representing the timestamp.\n            Currently this is only used in bigquery or delta table based datasources.\n            "},"primary_key_columns":{"items":{"type":"string"},"type":"array","title":"Primary Key Columns","description":"\n            The names of the columns in the data representing the primary key.\n            If defined, These will be provided along with examples whenever they are provided.\n            "},"manual_trigger":{"type":"boolean","title":"Manual Trigger","description":"\n            If true, Upriver will not update the contract automatically and will\n            only monitor when triggered by the user.\n            ","default":false},"pause_new_derived_datasources":{"type":"boolean","title":"Pause New Derived Datasources","description":"\n            If true, Upriver will set derived datasources (derived by pivot field value) to paused state upon creation.\n            ","default":false}},"type":"object","title":"DatasourceContractGenerationConfiguration","description":"Configurations that alter the contract generation process."},"DatasourceId":{"properties":{"upriver_id":{"type":"string","title":"Upriver Id","description":"The unique identifier of the datasource in Upriver's system."},"name":{"type":"string","title":"Name","description":"\n            Name representing the datasource in the data set catalog and other pages, such as\n            incidents and notifications.\n            This name can be modified to provide a more meaningful identifier than the one assigned to\n            the physical storage.\n            "},"pivot_values":{"additionalProperties":{"type":"string"},"type":"object","title":"Pivot Values","description":"\n            For a derived (pivot) datasource, the pivot field -> value selection that produced it,\n            e.g. {\"country\": \"US\", \"region\": \"west\"}. Empty for root/standard datasources.\n            "}},"type":"object","required":["upriver_id","name"],"title":"DatasourceId","description":"A class representing the identity of a datasource.\nUsed to reference other datasources without loading the full datasource object."},"DatasourceIncidentConfiguration":{"properties":{"default_severity":{"type":"integer","exclusiveMinimum":0.0,"title":"Default Severity","description":"The default severity of incidents.","default":1000},"notification_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Webhook Url","description":"The webhook URL to be called when an incident is raised."}},"type":"object","title":"DatasourceIncidentConfiguration","description":"Configurations that alter the incidents raised by the datasource."},"DatasourceMetadataExpectations":{"properties":{"row_count":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Input"},{"type":"null"}],"description":"\n            Row count expectation over the datasource.\n            "},"freshness":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Input"},{"type":"null"}],"description":"\n            Freshness expectation over the datasource.\n            Freshness is measure of time between the last modified time of the data and\n            Upriver's task run time, given in seconds.\n            For example if the data should be written at most once a day the freshness\n            upper bound should be 24 * 60 * 60.\n            "},"row_uniqueness":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Input"},{"type":"null"}],"description":"\n            Row uniqueness expectation over the datasource.\n            Row uniqueness is the percentage of unique rows in the data.\n            Possible values between 0 and 1, where 1 means each row is unique.\n            "}},"type":"object","title":"DatasourceMetadataExpectations","description":"Metadata expectations configurations that can be set over the datasource.\nAll the expectations are optional, and can be set independently.\nRanged expectations can be set with a lower bound, an upper bound, or both.\nSetting any bound to None means that the expectation will not be set (or will be removed if it was set before)."},"DatasourceName":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"integer","title":"Type"},"tags":{"anyOf":[{"items":{"$ref":"#/components/schemas/TagSummary"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["id","name","type"],"title":"DatasourceName"},"DatasourceRunProgressResponse":{"properties":{"contracts_ready":{"type":"boolean","title":"Contracts Ready"},"finished":{"type":"boolean","title":"Finished"},"leaf_count":{"type":"integer","title":"Leaf Count"},"leaves_with_contracts":{"type":"integer","title":"Leaves With Contracts"}},"type":"object","required":["contracts_ready","finished","leaf_count","leaves_with_contracts"],"title":"DatasourceRunProgressResponse","description":"Progress of a run as tracked by the datasource itself (from our store, not the orchestrator).\n\nFor a pivot tree, a run produces one child datasource per pivot value; the leaves are the deepest\ndatasources, and they are what profile diffs compare. ``contracts_ready`` is the signal to wait for\nbefore running a profile/version diff: it means every leaf of this run has a generated contract.\n\n:param contracts_ready: True once every leaf datasource of the run has a contract (so diffs can run).\n:param finished: True once every leaf datasource of the run finished its incident analysis.\n:param leaf_count: Number of leaf datasources currently materialized for the run (0 before extraction).\n:param leaves_with_contracts: How many of those leaves already have a contract."},"DatasourceSchema":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"properties":{"additionalProperties":{"$ref":"#/components/schemas/SchemaField"},"type":"object","title":"Properties"},"type":{"type":"string","title":"Type","default":"object"},"upriver_expectations":{"anyOf":[{"$ref":"#/components/schemas/SchemaMetadataExpectations"},{"type":"null"}]}},"type":"object","required":["properties"],"title":"DatasourceSchema"},"DatasourceSettings":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"An optional unique identifier for the datasource defined by the user."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"\n            Name representing the datasource in the data set catalog and other pages, such as\n            incidents and notifications.\n            "},"connection_configuration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/KinesisConfiguration"},{"$ref":"#/components/schemas/FileSystemConfiguration"},{"$ref":"#/components/schemas/BigQueryConfiguration"},{"$ref":"#/components/schemas/SnowflakeConfiguration"},{"$ref":"#/components/schemas/RedshiftConfiguration"},{"$ref":"#/components/schemas/AthenaConfiguration"},{"$ref":"#/components/schemas/DuckDBConfiguration"},{"$ref":"#/components/schemas/TrinoConfiguration"}],"discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaConfiguration","big_query":"#/components/schemas/BigQueryConfiguration","duckdb":"#/components/schemas/DuckDBConfiguration","gcs":"#/components/schemas/FileSystemConfiguration","kinesis":"#/components/schemas/KinesisConfiguration","redshift":"#/components/schemas/RedshiftConfiguration","s3":"#/components/schemas/FileSystemConfiguration","snowflake":"#/components/schemas/SnowflakeConfiguration","trino":"#/components/schemas/TrinoConfiguration"}}},{"type":"null"}],"title":"Connection Configuration","description":"\n            The connection configuration for the datasource.\n            Note: For data integrations, only the id field can be modified to change which integration\n            the datasource connects to. All other integration fields are read-only and cannot be edited.\n            "},"owners":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owners","description":"\n            Assign users to a data source by choosing from the list of platform-accessible users.\n            This functionality promotes collaboration by clearly designating responsibility for each data source.\n            When a user is assigned as an owner, they are tagged and notified of any incidents related to\n            their data source, ensuring prompt attention and resolution.\n            "},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"\n            Tags to be associated with the datasource. Tags can be used to filter datasources in the UI.\n            "},"sampling_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Sampling Rate","description":"\n            Sampling rate for the data to be used to generate the contract, between 0 and 1.\n            If None, the system will determine and update the sampling rate automatically based on the volume of data.\n            "},"update_interval_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Update Interval Minutes","description":"\n            The time in minutes between contract updates.\n            If None, the system will determine and update the interval automatically as needed.\n            "},"manual_trigger":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Manual Trigger","description":"\n            If true, Upriver will not update the contract automatically and will only monitor\n            when triggered by the user.\n            "},"pivot_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pivot Fields","description":"\n            Pivot fields used to split the data into different contracts, using the default ``standard``\n            split method (one derived datasource per distinct value). For non-standard split methods\n            (specific / prominent / time / ranges) use ``pivots`` instead. As of this SDK version’s\n            release, Upriver supports a maximum of 2 pivot fields.\n            "},"pivots":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/StandardPivotField"},{"$ref":"#/components/schemas/SpecificPivotField"},{"$ref":"#/components/schemas/ProminentPivotField"},{"$ref":"#/components/schemas/TimePivotField"},{"$ref":"#/components/schemas/RangesPivotField"}],"discriminator":{"propertyName":"split_method","mapping":{"prominent":"#/components/schemas/ProminentPivotField","ranges":"#/components/schemas/RangesPivotField","specific":"#/components/schemas/SpecificPivotField","standard":"#/components/schemas/StandardPivotField","time":"#/components/schemas/TimePivotField"}}},"type":"array"},{"type":"null"}],"title":"Pivots","description":"\n            Rich pivot field configurations giving full control over how each field is split into\n            derived datasources (standard / specific / prominent / time / ranges). When set, this takes\n            precedence over ``pivot_fields``. Build entries with the ``Pivot`` factory helpers.\n            "},"nested_pivots":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Nested Pivots","description":"\n            Whether multiple pivot fields are nested (each field splits within the children of the\n            previous one, the default) or flat (every field splits the root independently, producing one\n            level of children per field). Changing this on an existing datasource recreates its derived\n            datasources.\n            "},"pause_new_derived_datasources":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pause New Derived Datasources","description":"\n            If true, Upriver will set derived datasources (derived by pivot field value) to paused\n            state upon creation.\n            "},"filter":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/Filter"},"type":"object"},{"type":"null"}],"title":"Filter","description":"\n            A map from field name (case sensitive) to the Filter to be applied to the field.\n            Only rows where all the fields match filter value will be considered for the contract.\n            "},"cardinality_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cardinality Threshold","description":"\n            The threshold for the cardinality of a column to be considered a categorical column.\n            If the column has less than cardinality_threshold unique values, it will be considered a categorical column.\n            Categorial columns will generate an exact histogram of the values provided,\n            and monitor both the specific values existence and their distribution.\n            "},"default_severity":{"anyOf":[{"$ref":"#/components/schemas/IncidentSeverity"},{"type":"null"}],"description":"The default severity of incidents."},"staleness_threshold_days":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Staleness Threshold Days","description":"The amount of days that no new data can be found before the datasource is considered stale."},"timestamp_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp Column","description":"\n            The name of the column in the data representing the timestamp.\n            Currently this is only used in bigquery or delta table based datasources.\n            "},"notification_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Webhook Url","description":"The webhook URL to be called when an incident is raised."},"nullify_empty_strings":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Nullify Empty Strings","description":"\n            If true, Upriver will consider an empty string as a null,\n            reducing completeness and not affecting the distribution of the lengths of the field.\n            "},"nullify_empty_arrays":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Nullify Empty Arrays","description":"\n            If true, Upriver will consider an empty array as a null,\n            reducing completeness and not affecting the distribution of the lengths of the field.\n            "},"only_analyze_updated_data":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Only Analyze Updated Data","description":"\n            If true, each run only analyzes the data added since the previous run and monitors freshness.\n            If false, each run analyzes the full dataset. Left unchanged when omitted.\n            "},"default_sensitivity":{"anyOf":[{"$ref":"#/components/schemas/ModelSensitivity"},{"type":"null"}],"description":"Default anomaly detection sensitivity for the datasource."},"field_sensitivity_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldSensitivityChange"},"type":"array"},{"type":"null"}],"title":"Field Sensitivity Changes","description":"Field-level sensitivity overrides to set or clear."},"metric_sensitivity_changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetricSensitivityChange"},"type":"array"},{"type":"null"}],"title":"Metric Sensitivity Changes","description":"Per-metric sensitivity overrides to set or clear."}},"type":"object","title":"DatasourceSettings","description":"Configurations that can be edited after the datasource is created."},"DatasourceStatus":{"properties":{"monitoring_status":{"$ref":"#/components/schemas/MonitoringStatus"},"incident_status":{"$ref":"#/components/schemas/upriver__sdk__datasource__datasource_status__IncidentStatus"},"children_incident_status":{"anyOf":[{"$ref":"#/components/schemas/upriver__sdk__datasource__datasource_status__IncidentStatus"},{"type":"null"}],"description":"The aggegated status of this datasource and all of its children datasources, if it has any."},"has_sla":{"type":"boolean","title":"Has Sla"},"unresolved_incidents_count":{"type":"integer","title":"Unresolved Incidents Count"},"last_data_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Data Detected At"}},"type":"object","required":["monitoring_status","incident_status","children_incident_status","has_sla","unresolved_incidents_count","last_data_detected_at"],"title":"DatasourceStatus"},"DuckDBConfiguration":{"properties":{"type":{"type":"string","const":"duckdb","title":"Type","default":"duckdb"},"data_integration":{"anyOf":[{"$ref":"#/components/schemas/DuckDBIntegration"},{"type":"null"}]},"schema_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Name"},"table":{"type":"string","title":"Table"}},"type":"object","required":["table"],"title":"DuckDBConfiguration"},"DuckDBIntegration":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","const":"duckdb","title":"Type","default":"duckdb"},"name":{"type":"string","title":"Name"},"provisioning_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provisioning Config Id"},"path":{"type":"string","title":"Path"}},"type":"object","required":["id","name","path"],"title":"DuckDBIntegration"},"FieldChange":{"properties":{"property":{"type":"string","title":"Property"},"change_count":{"type":"integer","title":"Change Count"},"profile_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Field"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric"}},"additionalProperties":true,"type":"object","required":["property","change_count"],"title":"FieldChange","description":"A single detected change for a field, scoped to a metric/property."},"FieldExpectations":{"properties":{"min_value":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the minimum value of the field."},"max_value":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the maximum value of the field."},"mean":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the mean value of the field."},"std_dev":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the standard deviation of the field."},"sum":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the sum of the field."},"uniqueness":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for uniqueness (ratio of unique values). Values between 0 and 1."},"completeness":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for completeness (ratio of non-null values). Values between 0 and 1."},"cardinality":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the cardinality (number of distinct values) of the field."},"allowed_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Values","description":"List of allowed values for the field."},"format":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/RangedExpectation-Output"},"type":"object"},{"type":"null"}],"title":"Format","description":"Expected format distribution. Maps format name to its expected proportion range."},"histogram":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/RangedExpectation-Output"},"type":"object"},{"type":"null"}],"title":"Histogram","description":"Expected value distribution. Maps value to its expected proportion range."}},"type":"object","title":"FieldExpectations","description":"Field-level expectations that can be set via the user-defined schema.\nAll expectations are optional and can be set independently.\nRanged expectations accept a lower_bound, an upper_bound, or both."},"FieldSensitivityChange":{"properties":{"field_name":{"type":"string","title":"Field Name"},"sensitivity":{"anyOf":[{"$ref":"#/components/schemas/ModelSensitivity"},{"type":"null"}],"description":"Sensitivity override for the field. Omit or set null to inherit datasource default."}},"type":"object","required":["field_name"],"title":"FieldSensitivityChange","description":"Set or clear field-level sensitivity override."},"FileSystemConfiguration":{"properties":{"type":{"type":"string","enum":["s3","gcs"],"title":"Type"},"data_integration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AthenaIntegration"},{"$ref":"#/components/schemas/BigQueryIntegration"},{"$ref":"#/components/schemas/RedshiftIntegration"},{"$ref":"#/components/schemas/DuckDBIntegration"},{"$ref":"#/components/schemas/TrinoIntegration"}],"discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaIntegration","big_query":"#/components/schemas/BigQueryIntegration","duckdb":"#/components/schemas/DuckDBIntegration","redshift":"#/components/schemas/RedshiftIntegration","trino":"#/components/schemas/TrinoIntegration"}}},{"type":"null"}],"title":"Data Integration"},"bucket_path":{"type":"string","title":"Bucket Path","description":"The path of the bucket"},"bucket_prefix":{"type":"string","title":"Bucket Prefix","description":"The prefix in the bucket to scan in the datasource"},"region":{"type":"string","title":"Region","description":"The region in which the bucket is located"},"data_format":{"$ref":"#/components/schemas/DataFormat","description":"The format of the data stored in the bucket"},"additional_format_settings":{"anyOf":[{"$ref":"#/components/schemas/AdditionalFormatSettings"},{"type":"null"}],"description":"Additional format settings for the data stored in the bucket."}},"type":"object","required":["type","bucket_path","bucket_prefix","region","data_format"],"title":"FileSystemConfiguration"},"Filter":{"properties":{"operator":{"$ref":"#/components/schemas/FilterOperator"},"value":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}],"title":"Value"},"values":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Values"},"combinator":{"$ref":"#/components/schemas/FilterCombinator","default":"or"}},"type":"object","required":["operator"],"title":"Filter","description":"A filter applied to a single field.\n\nProvide either a single ``value`` or multiple ``values`` (combined with ``combinator``),\nbut not both. For example, to keep only two versions of a column::\n\n    Filter(operator=FilterOperator.EQUALS, values=[\"v1\", \"v2\"], combinator=FilterCombinator.OR)"},"FilterCombinator":{"type":"string","enum":["and","or"],"title":"FilterCombinator","description":"How multiple filter values are combined when ``values`` holds more than one entry."},"FilterOperator":{"type":"string","enum":["equals","not_equals"],"title":"FilterOperator","description":"Currently Upriver only supports equlity filters.\nAdditional filters are planned to be added in future releases."},"FormatProfile":{"properties":{"main_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Main Format"},"formats":{"additionalProperties":{"type":"number"},"type":"object","title":"Formats"},"examples":{"additionalProperties":{"items":{},"type":"array"},"type":"object","title":"Examples"}},"additionalProperties":true,"type":"object","title":"FormatProfile","description":"The detected format breakdown for a field."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Incident":{"properties":{"id":{"type":"integer","title":"Id"},"datasource_id":{"type":"string","title":"Datasource Id"},"datasource_name":{"type":"string","title":"Datasource Name"},"datasources":{"items":{"$ref":"#/components/schemas/DatasourceName"},"type":"array","title":"Datasources"},"asset_migrations":{"items":{"$ref":"#/components/schemas/AssetMigrationName"},"type":"array","title":"Asset Migrations"},"profile_diff_configurations":{"items":{"$ref":"#/components/schemas/ScheduledProfileDiffName"},"type":"array","title":"Profile Diff Configurations"},"timestamp":{"type":"number","title":"Timestamp"},"creation_time":{"type":"number","title":"Creation Time"},"last_detection_time":{"type":"number","title":"Last Detection Time"},"types":{"items":{"prefixItems":[{"$ref":"#/components/schemas/IncidentType"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Types"},"statuses":{"items":{"prefixItems":[{"$ref":"#/components/schemas/upriver__sdk__incidents__incident_enums__IncidentStatus"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Statuses"},"severities":{"items":{"prefixItems":[{"$ref":"#/components/schemas/IncidentSeverity"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Severities"},"severity":{"$ref":"#/components/schemas/IncidentSeverity"},"status":{"$ref":"#/components/schemas/upriver__sdk__incidents__incident_enums__IncidentStatus"},"incidents":{"items":{"$ref":"#/components/schemas/IncidentEvent"},"type":"array","title":"Incidents"},"owners":{"items":{"type":"string"},"type":"array","title":"Owners"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"analysis_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Task Id"}},"type":"object","required":["id","datasource_id","datasource_name","datasources","asset_migrations","profile_diff_configurations","timestamp","creation_time","last_detection_time","types","statuses","severities","severity","status","incidents","owners"],"title":"Incident","description":"An incident returned by the external API (same shape as the Upriver UI incident detail)."},"IncidentEvent":{"properties":{"_id":{"type":"string","title":"Id"},"datasource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasource Id"},"data_diff_configuration_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Diff Configuration Id"},"run_id":{"type":"string","title":"Run Id"},"status":{"$ref":"#/components/schemas/upriver__sdk__incidents__incident_enums__IncidentStatus"},"incident_type":{"$ref":"#/components/schemas/IncidentType"},"creation_timestamp":{"type":"number","title":"Creation Timestamp"},"timestamp":{"type":"number","title":"Timestamp"},"severity":{"$ref":"#/components/schemas/IncidentSeverity"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"owners":{"items":{"type":"string"},"type":"array","title":"Owners"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"additionalProperties":true,"type":"object","required":["_id","run_id","status","incident_type","creation_timestamp","timestamp","severity"],"title":"IncidentEvent","description":"A single event within an incident.\nAdditional type-specific fields are preserved (schema, field, data diff, etc.)."},"IncidentSeverity":{"type":"integer","enum":[100,200,300,400,1000],"title":"IncidentSeverity","description":"The predefined severity levels for incidents.\nThe lower the value, the higher the severity."},"IncidentType":{"type":"integer","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16],"title":"IncidentType"},"KinesisConfiguration":{"properties":{"type":{"type":"string","const":"kinesis","title":"Type","default":"kinesis"},"data_integration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AthenaIntegration"},{"$ref":"#/components/schemas/BigQueryIntegration"},{"$ref":"#/components/schemas/RedshiftIntegration"},{"$ref":"#/components/schemas/DuckDBIntegration"},{"$ref":"#/components/schemas/TrinoIntegration"}],"discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaIntegration","big_query":"#/components/schemas/BigQueryIntegration","duckdb":"#/components/schemas/DuckDBIntegration","redshift":"#/components/schemas/RedshiftIntegration","trino":"#/components/schemas/TrinoIntegration"}}},{"type":"null"}],"title":"Data Integration"},"stream_name":{"type":"string","title":"Stream Name","description":"The name of the Kinesis stream"},"region":{"type":"string","title":"Region","description":"The AWS region of the Kinesis stream"}},"type":"object","required":["stream_name","region"],"title":"KinesisConfiguration"},"MetadataChange":{"properties":{"property":{"type":"string","title":"Property"},"change_times":{"items":{"type":"string","format":"date-time"},"type":"array","title":"Change Times"}},"additionalProperties":true,"type":"object","required":["property"],"title":"MetadataChange","description":"A change to table-level metadata (e.g. ``row_count``)."},"MetricSensitivityChange":{"properties":{"field_name":{"type":"string","title":"Field Name"},"metric":{"type":"string","title":"Metric"},"sensitivity":{"anyOf":[{"$ref":"#/components/schemas/ModelSensitivity"},{"type":"null"}],"description":"Sensitivity override for the metric. Omit or set null to inherit field/datasource default."}},"type":"object","required":["field_name","metric"],"title":"MetricSensitivityChange","description":"Set or clear per-metric sensitivity override on a field."},"ModelSensitivity":{"type":"string","enum":["mute","low","medium","high","very_high"],"title":"ModelSensitivity","description":"Anomaly detection sensitivity for raising incidents."},"MonitoringStatus":{"type":"string","enum":["INITIALIZING","RUNNING","ERROR","PAUSED","STALE","LEARNING"],"title":"MonitoringStatus","description":"The current status of the datasource."},"NewDatasource":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"An optional unique identifier for the datasource defined by the user."},"name":{"type":"string","title":"Name","description":"\n            Name representing the datasource in the data set catalog and other pages, such as\n            incidents and notifications.\n            This name can be modified to provide a more meaningful identifier than the one assigned to\n            the physical storage.\n            "},"owners":{"items":{"type":"string"},"type":"array","title":"Owners","description":"\n            Assign users to a data source by choosing from the list of platform-accessible users.\n            This functionality promotes collaboration by clearly designating responsibility for each data source.\n            When a user is assigned as an owner, they are tagged and notified of any incidents related to\n            their data source, ensuring prompt attention and resolution.\n            "},"data_connection_configuration":{"oneOf":[{"$ref":"#/components/schemas/KinesisConfiguration"},{"$ref":"#/components/schemas/FileSystemConfiguration"},{"$ref":"#/components/schemas/BigQueryConfiguration"},{"$ref":"#/components/schemas/SnowflakeConfiguration"},{"$ref":"#/components/schemas/RedshiftConfiguration"},{"$ref":"#/components/schemas/AthenaConfiguration"},{"$ref":"#/components/schemas/DuckDBConfiguration"},{"$ref":"#/components/schemas/TrinoConfiguration"}],"title":"Data Connection Configuration","discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaConfiguration","big_query":"#/components/schemas/BigQueryConfiguration","duckdb":"#/components/schemas/DuckDBConfiguration","gcs":"#/components/schemas/FileSystemConfiguration","kinesis":"#/components/schemas/KinesisConfiguration","redshift":"#/components/schemas/RedshiftConfiguration","s3":"#/components/schemas/FileSystemConfiguration","snowflake":"#/components/schemas/SnowflakeConfiguration","trino":"#/components/schemas/TrinoConfiguration"}}},"contract_generation_configuration":{"$ref":"#/components/schemas/DatasourceContractGenerationConfiguration"},"incident_configuration":{"$ref":"#/components/schemas/DatasourceIncidentConfiguration"},"pivot_fields":{"items":{"type":"string"},"type":"array","title":"Pivot Fields","description":"\n            Pivot fields used to split the data into different contracts, using the default ``standard``\n            split method (one derived datasource per distinct value). For non-standard split methods\n            (specific / prominent / time / ranges) use ``pivots`` instead. As of this SDK version’s\n            release, Upriver supports a maximum of 2 pivot fields.\n            ","default":[]},"pivots":{"items":{"oneOf":[{"$ref":"#/components/schemas/StandardPivotField"},{"$ref":"#/components/schemas/SpecificPivotField"},{"$ref":"#/components/schemas/ProminentPivotField"},{"$ref":"#/components/schemas/TimePivotField"},{"$ref":"#/components/schemas/RangesPivotField"}],"discriminator":{"propertyName":"split_method","mapping":{"prominent":"#/components/schemas/ProminentPivotField","ranges":"#/components/schemas/RangesPivotField","specific":"#/components/schemas/SpecificPivotField","standard":"#/components/schemas/StandardPivotField","time":"#/components/schemas/TimePivotField"}}},"type":"array","title":"Pivots","description":"\n            Rich pivot field configurations giving full control over how each field is split into\n            derived datasources (standard / specific / prominent / time / ranges). When non-empty, this\n            takes precedence over ``pivot_fields``. Build entries with the ``Pivot`` factory helpers.\n            ","default":[]},"nested_pivots":{"type":"boolean","title":"Nested Pivots","description":"\n            Whether multiple pivot fields are nested (each field splits within the children of the\n            previous one, the default) or flat (every field splits the root independently, producing one\n            level of children per field).\n            ","default":true},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"\n            Tags allows to organize and classify data sources for more efficient management and enhanced\n            access controls.\n            ","default":[]},"is_key_asset":{"type":"boolean","title":"Is Key Asset","description":"If true, the datasource is a key asset.","default":false},"pause_on_creation":{"type":"boolean","title":"Pause On Creation","description":"If true, the datasource will be paused upon creation.","default":false},"create_in_learning_state":{"type":"boolean","title":"Create In Learning State","description":"\n            If true, the datasource is created directly in the LEARNING state instead of INITIALIZING,\n            skipping the initialization run. This makes the first manual run honor a requested time\n            window (start_time / run_time) when the source supports time filtering. Ignored when\n            pause_on_creation is true.\n            ","default":false}},"type":"object","required":["name","owners","data_connection_configuration"],"title":"NewDatasource","description":"Represents a request to create a new datasource."},"NewDatasourceResponse":{"properties":{"id":{"type":"string","title":"Id","description":"The unique identifier of the datasource in Upriver's system."}},"type":"object","required":["id"],"title":"NewDatasourceResponse"},"PivotCadence":{"type":"string","enum":["monthly","quarterly","yearly"],"title":"PivotCadence","description":"Time bucket cadence for a :class:`TimePivotField`."},"ProfileDiff":{"properties":{"first_datasource_data":{"$ref":"#/components/schemas/ProfileDiffSingleDatasource"},"second_datasource_data":{"$ref":"#/components/schemas/ProfileDiffSingleDatasource"},"metadata_changes":{"items":{"$ref":"#/components/schemas/MetadataChange"},"type":"array","title":"Metadata Changes"},"field_change_count":{"type":"integer","title":"Field Change Count"}},"additionalProperties":true,"type":"object","required":["first_datasource_data","second_datasource_data","field_change_count"],"title":"ProfileDiff","description":"A profile comparison between two datasources.\n\nThe filter helpers own their logic here as chainable methods that each return a NEW,\nfiltered ``ProfileDiff`` (the original is never mutated), so they compose naturally::\n\n    diff.only_changes().whitelist_metrics([ProfileMetric.COMPLETENESS]).blacklist_fields([\"internal_id\"])\n\nThe same operations are also available as standalone functions in\n:mod:`upriver.sdk.profile_diff.filters`, which simply delegate to these methods."},"ProfileDiffField":{"properties":{"field_name":{"type":"string","title":"Field Name"},"is_missing":{"type":"boolean","title":"Is Missing"},"profile":{"anyOf":[{"$ref":"#/components/schemas/ProfileValues"},{"type":"null"}]},"changes":{"items":{"$ref":"#/components/schemas/FieldChange"},"type":"array","title":"Changes"},"has_default_value":{"type":"boolean","title":"Has Default Value","default":false},"low_cardinality":{"type":"boolean","title":"Low Cardinality","default":false},"is_empty":{"type":"boolean","title":"Is Empty","default":false},"is_required":{"type":"boolean","title":"Is Required","default":false}},"additionalProperties":true,"type":"object","required":["field_name","is_missing"],"title":"ProfileDiffField","description":"A field within one datasource side of a comparison, with its profile and changes."},"ProfileDiffSingleDatasource":{"properties":{"datasource_id":{"type":"string","title":"Datasource Id"},"datasource_name":{"type":"string","title":"Datasource Name"},"timestamp":{"type":"number","title":"Timestamp"},"fields":{"items":{"$ref":"#/components/schemas/ProfileDiffField"},"type":"array","title":"Fields"},"overridden_fields":{"items":{"$ref":"#/components/schemas/ProfileDiffField"},"type":"array","title":"Overridden Fields"},"row_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Row Count"}},"additionalProperties":true,"type":"object","required":["datasource_id","datasource_name","timestamp"],"title":"ProfileDiffSingleDatasource","description":"One side (datasource) of a profile diff comparison."},"ProfileValues":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"uniqueness":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Uniqueness"},"completeness":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completeness"},"histogram":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Histogram"},"prominent_histogram":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Prominent Histogram"},"min_value":{"anyOf":[{},{"type":"null"}],"title":"Min Value"},"max_value":{"anyOf":[{},{"type":"null"}],"title":"Max Value"},"format":{"anyOf":[{"$ref":"#/components/schemas/FormatProfile"},{"type":"null"}]},"sum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sum"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length"},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"min_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Length"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Length"},"mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mean"},"mean_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mean Length"},"std_dev":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Std Dev"},"std_dev_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Std Dev Length"},"cardinality":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cardinality"}},"additionalProperties":true,"type":"object","title":"ProfileValues","description":"The profile (metric values) for a single field in one datasource.\n\nEvery metric is optional; which ones are populated depends on the field type."},"ProminentPivotField":{"properties":{"field_name":{"type":"string","title":"Field Name","description":"The name of the field to split the datasource by."},"split_method":{"type":"string","const":"prominent","title":"Split Method","default":"prominent"},"split_config":{"$ref":"#/components/schemas/ProminentSplitConfig"}},"type":"object","required":["field_name","split_config"],"title":"ProminentPivotField","description":"Split a field into one derived datasource for each of the N most prominent values."},"ProminentSplitConfig":{"properties":{"number_of_prominent":{"type":"integer","exclusiveMinimum":0.0,"title":"Number Of Prominent","description":"The number of most-prominent (most frequent) values to create derived datasources for."}},"type":"object","required":["number_of_prominent"],"title":"ProminentSplitConfig"},"RangedExpectation-Input":{"properties":{"lower_bound":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Lower Bound"},"upper_bound":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Upper Bound"}},"type":"object","title":"RangedExpectation"},"RangedExpectation-Output":{"properties":{"min":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}],"title":"Max"}},"type":"object","title":"RangedExpectation"},"RangesPivotField":{"properties":{"field_name":{"type":"string","title":"Field Name","description":"The name of the field to split the datasource by."},"split_method":{"type":"string","const":"ranges","title":"Split Method","default":"ranges"},"split_config":{"$ref":"#/components/schemas/RangesSplitConfig"}},"type":"object","required":["field_name","split_config"],"title":"RangesPivotField","description":"Split a field into one derived datasource per named numeric range."},"RangesSplitConfig":{"properties":{"ranges":{"additionalProperties":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"object","title":"Ranges","description":"\n            A map from a range name to its (lower_bound, upper_bound) tuple. One derived datasource is\n            created per named range, containing the rows whose value falls within that range.\n            "}},"type":"object","required":["ranges"],"title":"RangesSplitConfig"},"RedshiftConfiguration":{"properties":{"type":{"type":"string","const":"redshift","title":"Type","default":"redshift"},"data_integration":{"anyOf":[{"$ref":"#/components/schemas/RedshiftIntegration"},{"type":"null"}]},"database":{"type":"string","title":"Database"},"schema_name":{"type":"string","title":"Schema Name"},"table":{"type":"string","title":"Table"}},"type":"object","required":["database","schema_name","table"],"title":"RedshiftConfiguration"},"RedshiftIntegration":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","const":"redshift","title":"Type","default":"redshift"},"name":{"type":"string","title":"Name"},"provisioning_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provisioning Config Id"},"host_addr":{"type":"string","title":"Host Addr"},"host_port":{"type":"integer","title":"Host Port"}},"type":"object","required":["id","name","host_addr","host_port"],"title":"RedshiftIntegration"},"RunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"}},"type":"object","required":["run_id"],"title":"RunResponse"},"RunStatus":{"type":"string","enum":["in progress","run failed","empty run","no incidents","minor incidents","major incidents"],"title":"RunStatus"},"RunStatusResponse":{"properties":{"run_result":{"$ref":"#/components/schemas/RunStatus"}},"type":"object","required":["run_result"],"title":"RunStatusResponse"},"ScheduledProfileDiffName":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"profile_diff_configuration_id":{"type":"integer","title":"Profile Diff Configuration Id"},"profile_diff_configuration_name":{"type":"string","title":"Profile Diff Configuration Name"},"datasource_a":{"$ref":"#/components/schemas/DatasourceName"},"datasource_b":{"$ref":"#/components/schemas/DatasourceName"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","profile_diff_configuration_id","profile_diff_configuration_name","datasource_a","datasource_b"],"title":"ScheduledProfileDiffName"},"SchemaField":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"upriver_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upriver Format"},"properties":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SchemaField"},"type":"object"},{"type":"null"}],"title":"Properties"},"upriver_expectations":{"anyOf":[{"$ref":"#/components/schemas/FieldExpectations"},{"type":"null"}]}},"type":"object","title":"SchemaField"},"SchemaMetadataExpectations":{"properties":{"row_count":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected range for the row count of the datasource."},"freshness":{"anyOf":[{"$ref":"#/components/schemas/RangedExpectation-Output"},{"type":"null"}],"description":"Expected freshness in seconds (time between data last-modified and Upriver run time)."}},"type":"object","title":"SchemaMetadataExpectations","description":"Metadata expectations that can be set at the schema level.\nThese apply to the datasource as a whole, not to individual fields."},"SchemaResponse":{"properties":{"model_schema":{"anyOf":[{"$ref":"#/components/schemas/DatasourceSchema"},{"type":"null"}]},"user_defined_schema":{"anyOf":[{"$ref":"#/components/schemas/DatasourceSchema"},{"type":"null"}]}},"type":"object","title":"SchemaResponse"},"SnowflakeConfiguration":{"properties":{"type":{"type":"string","const":"snowflake","title":"Type","default":"snowflake"},"data_integration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AthenaIntegration"},{"$ref":"#/components/schemas/BigQueryIntegration"},{"$ref":"#/components/schemas/RedshiftIntegration"},{"$ref":"#/components/schemas/DuckDBIntegration"},{"$ref":"#/components/schemas/TrinoIntegration"}],"discriminator":{"propertyName":"type","mapping":{"athena":"#/components/schemas/AthenaIntegration","big_query":"#/components/schemas/BigQueryIntegration","duckdb":"#/components/schemas/DuckDBIntegration","redshift":"#/components/schemas/RedshiftIntegration","trino":"#/components/schemas/TrinoIntegration"}}},{"type":"null"}],"title":"Data Integration"},"host":{"type":"string","title":"Host"},"database":{"type":"string","title":"Database"},"schema_name":{"type":"string","title":"Schema Name"},"table":{"type":"string","title":"Table"}},"type":"object","required":["host","database","schema_name","table"],"title":"SnowflakeConfiguration"},"SnowflakeNativeAppNextQueryView":{"properties":{"query_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Job Id"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"claim_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Token"},"max_rows":{"type":"integer","title":"Max Rows","default":1000},"max_columns":{"type":"integer","title":"Max Columns","default":1000},"max_body_bytes":{"type":"integer","title":"Max Body Bytes","default":5242880},"max_error_message_chars":{"type":"integer","title":"Max Error Message Chars","default":4000}},"type":"object","title":"SnowflakeNativeAppNextQueryView"},"SnowflakeNativeAppRegisterResponseView":{"properties":{"ok":{"type":"boolean","title":"Ok"},"install_token":{"type":"string","title":"Install Token"},"integration_id":{"type":"integer","title":"Integration Id"},"poll_url":{"type":"string","title":"Poll Url"},"complete_url":{"type":"string","title":"Complete Url"}},"type":"object","required":["ok","install_token","integration_id","poll_url","complete_url"],"title":"SnowflakeNativeAppRegisterResponseView"},"SpecificPivotField":{"properties":{"field_name":{"type":"string","title":"Field Name","description":"The name of the field to split the datasource by."},"split_method":{"type":"string","const":"specific","title":"Split Method","default":"specific"},"split_config":{"$ref":"#/components/schemas/SpecificSplitConfig"}},"type":"object","required":["field_name","split_config"],"title":"SpecificPivotField","description":"Split a field into one derived datasource per explicitly listed value."},"SpecificSplitConfig":{"properties":{"specific_values":{"items":{"type":"string"},"type":"array","title":"Specific Values","description":"The exact field values to create derived datasources for. Other values are ignored."}},"type":"object","required":["specific_values"],"title":"SpecificSplitConfig"},"StandardPivotField":{"properties":{"field_name":{"type":"string","title":"Field Name","description":"The name of the field to split the datasource by."},"split_method":{"type":"string","const":"standard","title":"Split Method","default":"standard"},"split_config":{"type":"null","title":"Split Config"}},"type":"object","required":["field_name"],"title":"StandardPivotField","description":"Split a field into one derived datasource per distinct value."},"Tag":{"properties":{"name":{"type":"string","title":"Name","description":"\n            Name representing the tag in the data set catalog and other pages.\n        "},"short_description":{"type":"string","maxLength":100,"title":"Short Description","description":"Short description of the tag to be presented in the user interface."},"description":{"type":"string","maxLength":1000,"title":"Description","description":"Detailed description of the tag to be presented in the user interface."},"color":{"type":"string","title":"Color","description":"Hexadecimal color code to be associated with this tag in the user interface.","default":"#000000"},"permission":{"$ref":"#/components/schemas/TagPermission","description":"The permission level of the tag.","default":"public"}},"type":"object","required":["name","short_description","description"],"title":"Tag"},"TagPermission":{"type":"string","enum":["public","restricted"],"title":"TagPermission","description":"Tag permission level."},"TagSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"short_description":{"type":"string","title":"Short Description"},"description":{"type":"string","title":"Description"},"color":{"type":"string","title":"Color"}},"additionalProperties":true,"type":"object","required":["id","name","short_description","description","color"],"title":"TagSummary"},"TimePivotField":{"properties":{"field_name":{"type":"string","title":"Field Name","description":"The name of the field to split the datasource by."},"split_method":{"type":"string","const":"time","title":"Split Method","default":"time"},"split_config":{"$ref":"#/components/schemas/TimeSplitConfig"}},"type":"object","required":["field_name","split_config"],"title":"TimePivotField","description":"Split a field into derived datasources bucketed by a time cadence."},"TimeSplitConfig":{"properties":{"cadence":{"$ref":"#/components/schemas/PivotCadence","description":"The time cadence used to bucket values into derived datasources."}},"type":"object","required":["cadence"],"title":"TimeSplitConfig"},"TrinoCatalog":{"type":"string","enum":["iceberg","hive","delta"],"title":"TrinoCatalog"},"TrinoConfiguration":{"properties":{"type":{"type":"string","const":"trino","title":"Type","default":"trino"},"data_integration":{"anyOf":[{"$ref":"#/components/schemas/TrinoIntegration"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"catalog":{"type":"string","title":"Catalog"},"catalog_type":{"$ref":"#/components/schemas/TrinoCatalog"},"schema_name":{"type":"string","title":"Schema Name"},"table":{"type":"string","title":"Table"}},"type":"object","required":["catalog","catalog_type","schema_name","table"],"title":"TrinoConfiguration"},"TrinoIntegration":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","const":"trino","title":"Type","default":"trino"},"name":{"type":"string","title":"Name"},"provisioning_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provisioning Config Id"},"host_addr":{"type":"string","title":"Host Addr"},"host_port":{"type":"integer","title":"Host Port"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"http_scheme":{"type":"string","title":"Http Scheme","default":"https"}},"type":"object","required":["id","name","host_addr","host_port"],"title":"TrinoIntegration"},"UserToken":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"UserToken","description":"A dataclass representing a user token."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"upriver__sdk__datasource__datasource_status__IncidentStatus":{"type":"string","enum":["HAS_NEW_INCIDENTS","UNSTABLE","STABLE"],"title":"IncidentStatus"},"upriver__sdk__incidents__incident_enums__IncidentStatus":{"type":"integer","enum":[0,1,2,3,4,5],"title":"IncidentStatus"}}}}