Skip to main content

connection_data.proto

path mgmt/v1alpha1/connection_data.proto

package mgmt.v1alpha1


Messages

AwsDynamoDBStreamConfig

NameTypeDescription

AwsS3SchemaConfig

NameTypeDescription
job_idstringThe unique identifier of the job to get the schema for.
job_run_idstringThe unique identifier of the job run to get the schema for.

AwsS3StreamConfig

NameTypeDescription
job_idstringThe unique identifier of the job to get the data stream for.
job_run_idstringThe unique identifier of the job run to get the data stream for.

ConnectionSchemaConfig

NameTypeDescription
pg_configPostgresSchemaConfig
aws_s3_configAwsS3SchemaConfig
mysql_configMysqlSchemaConfig
mongo_configMongoSchemaConfig
gcp_cloudstorage_configGcpCloudStorageSchemaConfig
dynamodb_configDynamoDBSchemaConfig
mssql_configMssqlSchemaConfig

ConnectionStreamConfig

NameTypeDescription
pg_configPostgresStreamConfig
aws_s3_configAwsS3StreamConfig
mysql_configMysqlStreamConfig
gcp_cloudstorage_configGcpCloudStorageStreamConfig
dynamodb_configAwsDynamoDBStreamConfig

DatabaseColumn

NameTypeDescription
schemastringThe database schema. Ex: public
tablestringThe name of the table in the schema
columnstringThe name of the column
data_typestringThe datatype of the column
is_nullablestringThe isNullable Flag of the column
column_defaultoptional stringThe default value of the column if available
generated_typeoptional stringPopulated if the column is generated. The value is the type of generated column it is. For example, postgres is 's' for stored May be other values in the future, or other DB providers may use a different value types.
identity_generationoptional stringPopulated if the column is an identity. The value is the type of the identity column it is. For example, postgres is 'd' for generated by default, or 'a' for generated always.

DatabaseTable

NameTypeDescription
schemastringThe schema of the table
tablestringThe table name

DynamoDBSchemaConfig

NameTypeDescription

ForeignConstraint

NameTypeDescription
foreign_keyForeignKeyThe foreign key that is associated with the constraint
columnsrepeated stringThe columns that are part of the constraint
not_nullablerepeated boolThe not nullable flag for each column

ForeignConstraintTables

NameTypeDescription
constraintsrepeated ForeignConstraintA list of foreign key constraints

ForeignKey

NameTypeDescription
tablestringThe table that the foreign key is associated with
columnsrepeated stringThe columns that are part of the foreign key

GcpCloudStorageSchemaConfig

NameTypeDescription
job_idstringThe unique identifier of the job to get the schema for.
job_run_idstringThe unique identifier of the job run to get the schema for.

GcpCloudStorageStreamConfig

NameTypeDescription
job_idstringThe unique identifier of the job to get the data stream for.
job_run_idstringThe unique identifier of the job run to get the data stream for.

GetAiGeneratedDataRequest

NameTypeDescription
ai_connection_idstringThe unique identifier of a connection, specifically one that is configured for LLM use.
countint64The number of records to generate
model_namestringThe LLM model name to use that works with the configured connection id.
user_promptoptional stringThe prompt that will be used to further refine the data generation. This is appended to the prompt that Neosync generates that includes schema information.
data_connection_idstringThe unique identifier of a connection that the AI generated data would be inserted into. This is used to generate and send schema information to the LLM to help shape the generated data.
tableDatabaseTableThe table to generate data for.

GetAiGeneratedDataResponse

NameTypeDescription
recordsrepeated google.protobuf.StructA list of generated records

GetConnectionDataStreamRequest

NameTypeDescription
connection_idstringThe unique identifier of the connection to get the data stream for.
stream_configConnectionStreamConfigThe stream configuration to use for the data stream.
schemastringThe schema of the table to get the data stream for.
tablestringThe table to get the data stream for.

GetConnectionDataStreamResponse

Each stream response is a single row in the requested schema and table

NameTypeDescription
row_bytesbytesA map of column name to column value, where the value is serialized as bytes. The value represents a map[string]any structure.

GetConnectionInitStatementsRequest

NameTypeDescription
connection_idstringThe unique identifier of the connection to get the init statements for.
optionsInitStatementOptionsThe options to use for the init statements.

GetConnectionInitStatementsResponse

Init statement for a specific table

NameTypeDescription
table_init_statementsrepeated GetConnectionInitStatementsResponse.TableInitStatementsEntryThe key here is <schema>.<table> and value is the table init statement.
table_truncate_statementsrepeated GetConnectionInitStatementsResponse.TableTruncateStatementsEntryThe key here is <schema>.<table> and value is the table truncate statement.
schema_init_statementsrepeated SchemaInitStatementsA list of schema initialization statements

GetConnectionInitStatementsResponse.TableInitStatementsEntry

NameTypeDescription
keystring
valuestring

GetConnectionInitStatementsResponse.TableTruncateStatementsEntry

NameTypeDescription
keystring
valuestring

GetConnectionSchemaMapRequest

NameTypeDescription
connection_idstringThe unique identifier of the connection to get the schema map for.
schema_configConnectionSchemaConfigThe schema configuration to use for the schema map.

GetConnectionSchemaMapResponse

NameTypeDescription
schema_maprepeated GetConnectionSchemaMapResponse.SchemaMapEntryReturns the database columns separated by the fully qualified <schema>.<table>

GetConnectionSchemaMapResponse.SchemaMapEntry

NameTypeDescription
keystring
valueGetConnectionSchemaResponse

GetConnectionSchemaMapsRequest

NameTypeDescription
requestsrepeated GetConnectionSchemaMapRequestList of connection schema maps to request

GetConnectionSchemaMapsResponse

NameTypeDescription
responsesrepeated GetConnectionSchemaMapResponseList of responses in the same order as the input
connection_idsrepeated stringParallel array of each connection id that matches with the response

GetConnectionSchemaRequest

NameTypeDescription
connection_idstringThe unique identifier of the connection to get the schema for.
schema_configConnectionSchemaConfigThe schema configuration to use for the schema map.

GetConnectionSchemaResponse

NameTypeDescription
schemasrepeated DatabaseColumnThe list of database columns

GetConnectionTableConstraintsRequest

NameTypeDescription
connection_idstringThe unique identifier of the connection to get the constraints for.

GetConnectionTableConstraintsResponse

NameTypeDescription
foreign_key_constraintsrepeated GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntrythe key here is <schema>.<table> and the list of tables that it depends on, also `<schema>.<table>` format.
primary_key_constraintsrepeated GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntrythe key here is <schema>.<table> and value is the primary constraint
unique_constraintsrepeated GetConnectionTableConstraintsResponse.UniqueConstraintsEntrythe key here is <schema>.<table> and value is the unique constraint

GetConnectionTableConstraintsResponse.ForeignKeyConstraintsEntry

NameTypeDescription
keystring
valueForeignConstraintTables

GetConnectionTableConstraintsResponse.PrimaryKeyConstraintsEntry

NameTypeDescription
keystring
valuePrimaryConstraint

GetConnectionTableConstraintsResponse.UniqueConstraintsEntry

NameTypeDescription
keystring
valueUniqueConstraints

GetTableRowCountRequest

NameTypeDescription
connection_idstringThe unique identifier of the connection to get the row count for.
schemastringThe schema of the table to get the row count for.
tablestringThe table to get the row count for.
where_clauseoptional stringThe optional where clause to filter the rows by.

GetTableRowCountResponse

NameTypeDescription
countint64The count of the rows in the table

InitStatementOptions

NameTypeDescription
init_schemaboolWhether or not to generate schema init statements.
truncate_before_insertboolWhether or not to generate truncation statements
truncate_cascadeboolWhether or not to generate truncate cascade statements.

MongoSchemaConfig

NameTypeDescription

MssqlSchemaConfig

NameTypeDescription

MysqlSchemaConfig

NameTypeDescription

MysqlStreamConfig

NameTypeDescription

PostgresSchemaConfig

NameTypeDescription

PostgresStreamConfig

NameTypeDescription

PrimaryConstraint

NameTypeDescription
columnsrepeated stringThe columns that are part of the primary constraint

SchemaInitStatements

NameTypeDescription
labelstringA friendly label associated with the generated schema init statement(s)
statementsrepeated stringA list of SQL statements that may be used to initialize a database from scratch.

UniqueConstraint

NameTypeDescription
columnsrepeated stringThe columns that are part of the unique constraint

UniqueConstraints

NameTypeDescription
constraintsrepeated UniqueConstraintThe unique constraints found for the table

Services

ConnectionDataService

Service for managing connection data. This is used in handle data from a connection

GetConnectionDataStream

MethodGetConnectionDataStream
RequestGetConnectionDataStreamRequest
ResponseGetConnectionDataStreamResponse stream
DescriptionStreaming endpoint that will stream the data available from the Connection to the client. Used primarily by the CLI sync command.

GetConnectionSchema

MethodGetConnectionSchema
RequestGetConnectionSchemaRequest
ResponseGetConnectionSchemaResponse
DescriptionReturns the schema for a specific connection. Used mostly for SQL-based connections

GetConnectionSchemaMap

MethodGetConnectionSchemaMap
RequestGetConnectionSchemaMapRequest
ResponseGetConnectionSchemaMapResponse
DescriptionReturns the schema in map format. The keys are the fully qualified table in the format <schema>.<table>

GetConnectionSchemaMaps

MethodGetConnectionSchemaMaps
RequestGetConnectionSchemaMapsRequest
ResponseGetConnectionSchemaMapsResponse
DescriptionReturns the schema in map format for every request provided

GetConnectionTableConstraints

MethodGetConnectionTableConstraints
RequestGetConnectionTableConstraintsRequest
ResponseGetConnectionTableConstraintsResponse
DescriptionFor a specific connection, returns the table constraints. Mostly useful for SQL-based Connections.

GetConnectionInitStatements

MethodGetConnectionInitStatements
RequestGetConnectionInitStatementsRequest
ResponseGetConnectionInitStatementsResponse
DescriptionFor a specific connection, returns the init table statements. Mostly useful for SQL-based Connections. Used primarily by the CLI sync command to create table schema init statement.

GetAiGeneratedData

MethodGetAiGeneratedData
RequestGetAiGeneratedDataRequest
ResponseGetAiGeneratedDataResponse
DescriptionQuery an AI connection by providing the necessary values. Typically used for generating preview data

GetTableRowCount

MethodGetTableRowCount
RequestGetTableRowCountRequest
ResponseGetTableRowCountResponse
DescriptionQuery table with subset to get row count