Skip to content

Commit

Permalink
Merge pull request #1 from getsynq/feature/cll
Browse files Browse the repository at this point in the history
adding protos for lineage
  • Loading branch information
grasskode authored Jan 18, 2024
2 parents e95e9ba + 8f1c222 commit ac75726
Show file tree
Hide file tree
Showing 7 changed files with 382 additions and 77 deletions.
76 changes: 38 additions & 38 deletions docs/example_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

## Table of Contents

- [example/v1/example.proto](#example_v1_example-proto)
- [Example](#example-v1-Example)

- [example/v1/example_service.proto](#example_v1_example_service-proto)
- [AddExampleRequest](#example-v1-AddExampleRequest)
- [AddExampleResponse](#example-v1-AddExampleResponse)
Expand All @@ -17,13 +20,45 @@

- [ExampleService](#example-v1-ExampleService)

- [example/v1/example.proto](#example_v1_example-proto)
- [Example](#example-v1-Example)

- [Scalar Value Types](#scalar-value-types)



<a name="example_v1_example-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## example/v1/example.proto



<a name="example-v1-Example"></a>

### Example
Example is the core model of this package.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | `id` is generated by the system when a new example is created. It is required to refer to an example in any future operations (like update or remove). |
| text | [string](#string) | | The example itself. |
| description | [string](#string) | optional | Optional description of the example. |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example creation time. |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example last update time. |















<a name="example_v1_example_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down Expand Up @@ -207,41 +242,6 @@ The service implements a basic CRUD API and contains server streaming example.



<a name="example_v1_example-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## example/v1/example.proto



<a name="example-v1-Example"></a>

### Example
Example is the core model of this package.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | `id` is generated by the system when a new example is created. It is required to refer to an example in any future operations (like update or remove). |
| text | [string](#string) | | The example itself. |
| description | [string](#string) | optional | Optional description of the example. |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example creation time. |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example last update time. |















## Scalar Value Types

| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
Expand Down
78 changes: 39 additions & 39 deletions docs/example_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

## Table of Contents

- [example/v2/example.proto](#example_v2_example-proto)
- [Example](#example-v2-Example)

- [example/v2/example_service.proto](#example_v2_example_service-proto)
- [AddExampleRequest](#example-v2-AddExampleRequest)
- [AddExampleResponse](#example-v2-AddExampleResponse)
Expand All @@ -17,13 +20,46 @@

- [ExampleService](#example-v2-ExampleService)

- [example/v2/example.proto](#example_v2_example-proto)
- [Example](#example-v2-Example)

- [Scalar Value Types](#scalar-value-types)



<a name="example_v2_example-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## example/v2/example.proto



<a name="example-v2-Example"></a>

### Example
Example is the core model of this package.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | `id` is generated by the system when a new example is created. It is required to refer to an example in any future operations (like update or remove). |
| text | [string](#string) | | The example itself. |
| description | [string](#string) | optional | Optional description of the example. |
| is_visible | [bool](#bool) | | Whether the example is visible to users. |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example creation time. |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example last update time. |















<a name="example_v2_example_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down Expand Up @@ -209,42 +245,6 @@ The service implements a basic CRUD API and contains server streaming example.



<a name="example_v2_example-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## example/v2/example.proto



<a name="example-v2-Example"></a>

### Example
Example is the core model of this package.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | `id` is generated by the system when a new example is created. It is required to refer to an example in any future operations (like update or remove). |
| text | [string](#string) | | The example itself. |
| description | [string](#string) | optional | Optional description of the example. |
| is_visible | [bool](#bool) | | Whether the example is visible to users. |
| created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example creation time. |
| updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Example last update time. |















## Scalar Value Types

| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
Expand Down
42 changes: 42 additions & 0 deletions protos/core/v1/entity.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
syntax = "proto3";

package core.v1;

import "core/v1/entity_type.proto";
import "core/v1/platforms.proto";

option go_package = "github.com/getsynq/cloud/api/core/v1";

// Lightweight reference to an Entity
message EntityRef {
string path = 1; // Unique path for entity.
EntityType type = 2; // Type of entity.
optional string name = 3; // Human friendly name.
}

// Entity in Synq.
message Entity {
oneof data {
Asset asset = 1;
Monitor monitor = 2;
MonitorSegment monitor_segment = 3;
}
}

// Entity: Asset.
message Asset {
string asset_path = 1;
Platform platform = 2;
}

// Entity: Monitor
message Monitor {
string monitor_path = 1;
}

// Entity: Monitor Segment
message MonitorSegment {
string monitor_path = 1;
string metric_id = 2;
string segment = 3;
}
103 changes: 103 additions & 0 deletions protos/core/v1/entity_type.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
syntax = "proto3";

package core.v1;

option go_package = "github.com/getsynq/cloud/api/core/v1";

// Type of Entity.
// This enum lists all the types currently supported by Synq.
enum EntityType {
ENTITY_TYPE_UNSPECIFIED = 0;
ENTITY_TYPE_FOLDER = 1;

// BIGQUERY 1XX

ENTITY_TYPE_BQ_PROJECT = 101;
ENTITY_TYPE_BQ_DATASET = 102;
ENTITY_TYPE_BQ_TABLE = 103;
ENTITY_TYPE_BQ_VIEW = 105;

// LOOKER 2XX

ENTITY_TYPE_LOOKER_LOOK = 201;
ENTITY_TYPE_LOOKER_EXPLORE = 203;
ENTITY_TYPE_LOOKER_VIEW = 207;
ENTITY_TYPE_LOOKER_DASHBOARD = 208;

// DBT 3XX

ENTITY_TYPE_DBT_MODEL = 301;
ENTITY_TYPE_DBT_TEST = 302;
ENTITY_TYPE_DBT_SOURCE = 303;
ENTITY_TYPE_DBT_MACRO = 304;
ENTITY_TYPE_DBT_PROJECT = 306;
ENTITY_TYPE_DBT_METRIC = 307;
ENTITY_TYPE_DBT_SNAPSHOT = 310;
ENTITY_TYPE_DBT_SEED = 311;
ENTITY_TYPE_DBT_ANALYSIS = 312;
ENTITY_TYPE_DBT_EXPOSURE = 313;
ENTITY_TYPE_DBT_GROUP = 314;

// DBT 35X

ENTITY_TYPE_DBT_CLOUD_ACCOUNT = 351;
ENTITY_TYPE_DBT_CLOUD_PROJECT = 352;
ENTITY_TYPE_DBT_CLOUD_JOB = 353;
ENTITY_TYPE_DBT_CLOUD_JOB_STEP = 354;

// SNOWFLAKE 5XX

ENTITY_TYPE_SNOWFLAKE_PROJECT = 501;
ENTITY_TYPE_SNOWFLAKE_DATASET = 502;
ENTITY_TYPE_SNOWFLAKE_TABLE = 503;
ENTITY_TYPE_SNOWFLAKE_ACCOUNT = 505;
ENTITY_TYPE_SNOWFLAKE_DATABASE = 506;
ENTITY_TYPE_SNOWFLAKE_SCHEMA = 507;
ENTITY_TYPE_SNOWFLAKE_VIEW = 508;

// REDSHIFT 8XX

ENTITY_TYPE_REDSHIFT_DATABASE = 801;
ENTITY_TYPE_REDSHIFT_SCHEMA = 802;
ENTITY_TYPE_REDSHIFT_TABLE = 803;
ENTITY_TYPE_REDSHIFT_VIEW = 805;

// TABLEAU 11xx

ENTITY_TYPE_TABLEAU_EMBEDDED = 1101;
ENTITY_TYPE_TABLEAU_PUBLISHED = 1102;
ENTITY_TYPE_TABLEAU_CUSTOM_SQL = 1103;
ENTITY_TYPE_TABLEAU_TABLE = 1104;
ENTITY_TYPE_TABLEAU_SHEET = 1105;
ENTITY_TYPE_TABLEAU_DASHBOARD = 1106;

// AIRFLOW 12xx

ENTITY_TYPE_AIRFLOW_DAG = 1201;
ENTITY_TYPE_AIRFLOW_TASK = 1202;

// CLICKHOUSE 13XX

ENTITY_TYPE_CLICKHOUSE_DATABASE = 1301;
ENTITY_TYPE_CLICKHOUSE_SCHEMA = 1302;
ENTITY_TYPE_CLICKHOUSE_TABLE = 1303;
ENTITY_TYPE_CLICKHOUSE_VIEW = 1305;

ENTITY_TYPE_ANOMALY_INTEGRATION = 1401;
ENTITY_TYPE_ANOMALY_MONITOR = 1403;
ENTITY_TYPE_ANOMALY_MONITOR_SEGMENT = 1404;

// POSTGRES 16XX

ENTITY_TYPE_POSTGRES_DATABASE = 1601;
ENTITY_TYPE_POSTGRES_SCHEMA = 1602;
ENTITY_TYPE_POSTGRES_TABLE = 1603;
ENTITY_TYPE_POSTGRES_VIEW = 1605;

// MYSQL 17XX

ENTITY_TYPE_MYSQL_DATABASE = 1701;
ENTITY_TYPE_MYSQL_SCHEMA = 1702;
ENTITY_TYPE_MYSQL_TABLE = 1703;
ENTITY_TYPE_MYSQL_VIEW = 1705;
}
23 changes: 23 additions & 0 deletions protos/core/v1/platforms.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
syntax = "proto3";

package core.v1;

option go_package = "github.com/getsynq/cloud/api/core/v1";

// Platforms supported by Synq.
enum Platform {
reserved 60, 70, 90, 140, 150, 1000;
PLATFORM_UNSPECIFIED = 0;
PLATFORM_BIGQUERY = 10;
PLATFORM_LOOKER = 20;
PLATFORM_DBT = 30;
PLATFORM_DBT_CLOUD = 31;
PLATFORM_DBT_SELF_HOSTED = 32;
PLATFORM_SNOWFLAKE = 50;
PLATFORM_REDSHIFT = 80;
PLATFORM_TABLEAU = 110;
PLATFORM_AIRFLOW = 120;
PLATFORM_CLICKHOUSE = 130;
PLATFORM_POSTGRES = 160;
PLATFORM_MYSQL = 170;
}
Loading

0 comments on commit ac75726

Please sign in to comment.