@grepr/cli 1.14.13-7f3738f → 1.15.0-e33385d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/build/dist/commands/job-draft-command.d.ts.map +1 -1
  2. package/build/dist/commands/job-draft-command.js +6 -71
  3. package/build/dist/commands/job-draft-command.js.map +1 -1
  4. package/build/dist/docs-index/index.json +1 -1
  5. package/build/dist/grepr.d.ts.map +1 -1
  6. package/build/dist/grepr.js +0 -2
  7. package/build/dist/grepr.js.map +1 -1
  8. package/build/dist/lib/backfill.js +4 -8
  9. package/build/dist/lib/backfill.js.map +1 -1
  10. package/build/dist/lib/job-patch.d.ts +15 -31
  11. package/build/dist/lib/job-patch.d.ts.map +1 -1
  12. package/build/dist/lib/job-patch.js +39 -709
  13. package/build/dist/lib/job-patch.js.map +1 -1
  14. package/build/dist/lib/job-plan.d.ts +3 -6
  15. package/build/dist/lib/job-plan.d.ts.map +1 -1
  16. package/build/dist/lib/job-plan.js +5 -55
  17. package/build/dist/lib/job-plan.js.map +1 -1
  18. package/build/dist/lib/option-parsers.d.ts +0 -5
  19. package/build/dist/lib/option-parsers.d.ts.map +1 -1
  20. package/build/dist/lib/option-parsers.js +0 -7
  21. package/build/dist/lib/option-parsers.js.map +1 -1
  22. package/build/dist/lib/signal-source.d.ts +1 -1
  23. package/build/dist/lib/signal-source.d.ts.map +1 -1
  24. package/build/dist/lib/signal-source.js +10 -69
  25. package/build/dist/lib/signal-source.js.map +1 -1
  26. package/build/dist/openapi/openApiTypes.d.ts +188 -9
  27. package/build/dist/openapi/openApiTypes.d.ts.map +1 -1
  28. package/build/dist/openapi/openApiTypes.js +21 -0
  29. package/build/dist/openapi/openApiTypes.js.map +1 -1
  30. package/build/dist/openapi-docs/api/Agents/create_2.md +1 -1
  31. package/build/dist/openapi-docs/api/Agents/investigations.md +1 -1
  32. package/build/dist/openapi-docs/api/Agents/update.md +1 -1
  33. package/build/dist/openapi-docs/api/Datasets/getDatasetDataTypes.md +25 -0
  34. package/build/dist/openapi-docs/schemas/AgentConfigCreate.md +3 -0
  35. package/build/dist/openapi-docs/schemas/AgentConfigPayload.md +3 -0
  36. package/build/dist/openapi-docs/schemas/AgentConfigUpdate.md +3 -0
  37. package/build/dist/openapi-docs/schemas/AgentSchedule.md +16 -0
  38. package/build/dist/openapi-docs/schemas/AnalyticsDiagnostic.md +4 -1
  39. package/build/dist/openapi-docs/schemas/AnalyticsDiagnosticRange.md +19 -0
  40. package/build/dist/openapi-docs/schemas/AnalyticsDraftRequest.md +2 -2
  41. package/build/dist/openapi-docs/schemas/AnalyticsField.md +6 -0
  42. package/build/dist/openapi-docs/schemas/AnalyticsQuery.md +3 -0
  43. package/build/dist/openapi-docs/schemas/AnalyticsResultGrouping.md +23 -0
  44. package/build/dist/openapi-docs/schemas/AnalyticsResultShape.md +22 -0
  45. package/build/dist/openapi-docs/schemas/AnalyticsTableBinding.md +1 -1
  46. package/build/dist/openapi-docs/schemas/AnalyticsVocabularyResponse.md +4 -0
  47. package/build/dist/openapi-docs/schemas/AthenaAnalyticsSource.md +2 -2
  48. package/build/dist/openapi-docs/schemas/DatasetDataTypes.md +9 -0
  49. package/build/dist/openapi-docs/schemas/EventRecord.md +11 -0
  50. package/build/dist/openapi-docs/schemas/SqlAnalyticsQuery.md +29 -0
  51. package/build/dist/openapi-docs/schemas/SqlAnalyticsTable.md +16 -0
  52. package/build/dist/openapi-docs/schemas/TrinoAnalyticsSource.md +2 -2
  53. package/build/dist/types.d.ts +8 -37
  54. package/build/dist/types.d.ts.map +1 -1
  55. package/build/dist/types.js +0 -69
  56. package/build/dist/types.js.map +1 -1
  57. package/package.json +1 -1
  58. package/build/dist/commands/job-to-test-command.d.ts +0 -74
  59. package/build/dist/commands/job-to-test-command.d.ts.map +0 -1
  60. package/build/dist/commands/job-to-test-command.js +0 -161
  61. package/build/dist/commands/job-to-test-command.js.map +0 -1
  62. package/build/dist/lib/job-graph-log-pipeline-constants.d.ts +0 -12
  63. package/build/dist/lib/job-graph-log-pipeline-constants.d.ts.map +0 -1
  64. package/build/dist/lib/job-graph-log-pipeline-constants.js +0 -16
  65. package/build/dist/lib/job-graph-log-pipeline-constants.js.map +0 -1
  66. package/build/dist/lib/job-graph-transformer.d.ts +0 -119
  67. package/build/dist/lib/job-graph-transformer.d.ts.map +0 -1
  68. package/build/dist/lib/job-graph-transformer.js +0 -767
  69. package/build/dist/lib/job-graph-transformer.js.map +0 -1
  70. package/build/dist/lib/job-graph-utils.d.ts +0 -50
  71. package/build/dist/lib/job-graph-utils.d.ts.map +0 -1
  72. package/build/dist/lib/job-graph-utils.js +0 -90
  73. package/build/dist/lib/job-graph-utils.js.map +0 -1
@@ -1,8 +1,6 @@
1
- import { CreateLogsBackfillJobDataType, CreateSpansBackfillJobDataType, LogsIcebergTableSinkType, SqlOperationType, TemplateOperationType, TraceReducerType } from '../openapi/openApiTypes.js';
2
- import { parseEdge } from './job-graph-utils.js';
1
+ import { CreateLogsBackfillJobDataType, CreateSpansBackfillJobDataType, TemplateOperationType } from '../openapi/openApiTypes.js';
3
2
  const LOG_REDUCER_TEMPLATE_NAME = 'log-reducer-job-graph-template';
4
3
  const TRACE_REDUCER_TEMPLATE_NAME = 'trace-reducer-job-graph-template';
5
- const RAW_LOGS_SINK_NAME_PREFIX = 'raw_data_sink';
6
4
  export function parseSignalDataType(value) {
7
5
  switch (value) {
8
6
  case CreateLogsBackfillJobDataType.logs:
@@ -35,8 +33,7 @@ export async function resolveSignalSource(options, apiClient, resolutionOptions
35
33
  dataType: options.dataType ?? CreateLogsBackfillJobDataType.logs,
36
34
  datasetId: options.datasetId,
37
35
  teamIds: [],
38
- sinkOperations: [],
39
- postReducerSqlOperations: []
36
+ sinkOperations: []
40
37
  };
41
38
  }
42
39
  const dataset = await resolveDatasetFromOptions(options, apiClient);
@@ -44,8 +41,7 @@ export async function resolveSignalSource(options, apiClient, resolutionOptions
44
41
  dataType: options.dataType ?? CreateLogsBackfillJobDataType.logs,
45
42
  datasetId: dataset.id,
46
43
  teamIds: includeTeamIds ? dataset.teamIds ?? [] : [],
47
- sinkOperations: [],
48
- postReducerSqlOperations: []
44
+ sinkOperations: []
49
45
  };
50
46
  }
51
47
  const job = await apiClient.getJob(options.jobId);
@@ -74,10 +70,12 @@ async function inferJobSource(job, apiClient) {
74
70
  throw new Error(`Source job ${job.id ?? job.name} has an ambiguous pipeline definition`);
75
71
  }
76
72
  const templateOperation = templateOperations[0];
77
- if (templateOperation) {
78
- return inferTemplateJobSource(templateOperation, apiClient);
73
+ if (!templateOperation) {
74
+ throw new Error(`Source job ${job.id ?? job.name} uses a raw job graph (no template-operation vertex). ` +
75
+ '--job-id supports only template-backed pipelines. ' +
76
+ 'Pass --dataset-id or --dataset-name instead. For a trace pipeline, also pass --data-type spans.');
79
77
  }
80
- return inferRawJobSource(job);
78
+ return inferTemplateJobSource(templateOperation, apiClient);
81
79
  }
82
80
  async function inferTemplateJobSource(operation, apiClient) {
83
81
  const template = await apiClient.getTemplate(operation.templateId, operation.templateVersion);
@@ -95,8 +93,7 @@ async function inferTemplateJobSource(operation, apiClient) {
95
93
  datasetId,
96
94
  sinkOperations: sinks
97
95
  .map(wrapper => wrapper.sink)
98
- .filter(isOperation),
99
- postReducerSqlOperations: []
96
+ .filter(isOperation)
100
97
  };
101
98
  }
102
99
  case TRACE_REDUCER_TEMPLATE_NAME: {
@@ -110,57 +107,13 @@ async function inferTemplateJobSource(operation, apiClient) {
110
107
  sinkOperations: (spansInput.sinks ?? [])
111
108
  .map(wrapper => wrapper.sink)
112
109
  .filter(isOperation),
113
- postReducerSqlOperations: spansInput.sqlOperations?.postReducer?.sqlOperation
114
- ? [spansInput.sqlOperations.postReducer.sqlOperation]
115
- : []
110
+ postReducerSqlOperation: spansInput.sqlOperations?.postReducer?.sqlOperation
116
111
  };
117
112
  }
118
113
  default:
119
114
  throw new Error(`Source job uses unsupported pipeline template ${template.name} (${operation.templateId})`);
120
115
  }
121
116
  }
122
- function inferRawJobSource(job) {
123
- const operations = job.jobGraph.vertices;
124
- const rawLogSinks = operations.filter(isRawLogsSink);
125
- const traceReducers = operations.filter(isTraceReducerWithDataset);
126
- if (rawLogSinks.length > 0 && traceReducers.length > 0) {
127
- throw new Error(`Source job ${job.id ?? job.name} contains both logs and spans datasets`);
128
- }
129
- if (rawLogSinks.length > 1) {
130
- throw new Error(`Source job ${job.id ?? job.name} has multiple raw logs datasets; ` +
131
- 'use --dataset-id to select one explicitly');
132
- }
133
- if (traceReducers.length > 1) {
134
- throw new Error(`Source job ${job.id ?? job.name} has multiple spans datasets; ` +
135
- 'use --dataset-id to select one explicitly');
136
- }
137
- const rawLogSink = rawLogSinks[0];
138
- if (rawLogSinks.length === 1 && rawLogSink) {
139
- return {
140
- dataType: CreateLogsBackfillJobDataType.logs,
141
- datasetId: rawLogSink.datasetId,
142
- sinkOperations: operations,
143
- postReducerSqlOperations: []
144
- };
145
- }
146
- const traceReducer = traceReducers[0];
147
- if (traceReducers.length === 1 && traceReducer) {
148
- const postReducerSqlOperations = job.jobGraph.vertices
149
- .filter(isSqlOperation)
150
- .filter(operation => job.jobGraph.edges.some(edge => {
151
- const parsed = parseEdge(edge);
152
- return parsed.sourceVertex === traceReducer.name &&
153
- parsed.targetVertex === operation.name;
154
- }));
155
- return {
156
- dataType: CreateSpansBackfillJobDataType.spans,
157
- datasetId: traceReducer.datasetId,
158
- sinkOperations: operations,
159
- postReducerSqlOperations
160
- };
161
- }
162
- throw new Error(`Source job ${job.id ?? job.name} has no supported raw logs or spans dataset`);
163
- }
164
117
  async function resolveDatasetFromOptions(options, apiClient) {
165
118
  if (options.datasetId) {
166
119
  return resolveDataset(options.datasetId, 'id', apiClient);
@@ -186,18 +139,6 @@ function requireDatasetName(datasetName) {
186
139
  function isTemplateOperation(operation) {
187
140
  return operation.type === TemplateOperationType.template_operation;
188
141
  }
189
- function isSqlOperation(operation) {
190
- return operation.type === SqlOperationType.sql_operation;
191
- }
192
- function isRawLogsSink(operation) {
193
- return operation.type === LogsIcebergTableSinkType.logs_iceberg_table_sink &&
194
- operation.name.startsWith(RAW_LOGS_SINK_NAME_PREFIX);
195
- }
196
- function isTraceReducerWithDataset(operation) {
197
- return operation.type === TraceReducerType.trace_reducer &&
198
- typeof operation.datasetId === 'string' &&
199
- operation.datasetId.length > 0;
200
- }
201
142
  function isOperation(operation) {
202
143
  return operation !== undefined;
203
144
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signal-source.js","sourceRoot":"","sources":["../../../src/main/typescript/lib/signal-source.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAUjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,yBAAyB,GAAG,gCAAgC,CAAC;AACnE,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AACvE,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAiClD,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,6BAA6B,CAAC,IAAI;YACrC,OAAO,6BAA6B,CAAC,IAAI,CAAC;QAC5C,KAAK,8BAA8B,CAAC,KAAK;YACvC,OAAO,8BAA8B,CAAC,KAAK,CAAC;QAC9C;YACE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAA2B;IACpE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAErE,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK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,OAA2B,EAC3B,SAAgC;IAEhC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,OAAO,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,cAAc,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AACpF,CAAC;AAED,KAAK,UAAU,cAAc,CAC3B,SAAiB,EACjB,aAA4B,EAC5B,SAAgC;IAEhC,MAAM,OAAO,GAAG,aAAa,KAAK,IAAI;QACpC,CAAC,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC;QACvC,CAAC,CAAC,MAAM,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,CAAC;IACvB,IAAI,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC;AAC5B,CAAC;AAED,SAAS,kBAAkB,CAAC,WAA+B;IACzD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,mBAAmB,CAAC,SAA0B;IACrD,OAAO,SAAS,CAAC,IAAI,KAAK,qBAAqB,CAAC,kBAAkB,CAAC;AACrE,CAAC;AAED,SAAS,WAAW,CAAC,SAAsC;IACzD,OAAO,SAAS,KAAK,SAAS,CAAC;AACjC,CAAC"}
@@ -956,6 +956,26 @@ export interface paths {
956
956
  patch?: never;
957
957
  trace?: never;
958
958
  };
959
+ "/v1/datasets/{id}/data-types": {
960
+ parameters: {
961
+ query?: never;
962
+ header?: never;
963
+ path?: never;
964
+ cookie?: never;
965
+ };
966
+ /**
967
+ * Get the data types a dataset holds
968
+ * @description Returns the data types the dataset holds, of logs_raw (logs) and spans_raw (traces). A type is held once a pipeline that writes it to the dataset is created or updated, and then stays held, even after the pipeline stops or retention empties the table.
969
+ */
970
+ get: operations["getDatasetDataTypes"];
971
+ put?: never;
972
+ post?: never;
973
+ delete?: never;
974
+ options?: never;
975
+ head?: never;
976
+ patch?: never;
977
+ trace?: never;
978
+ };
959
979
  "/v1/datasets/{id}/estimation-config": {
960
980
  parameters: {
961
981
  query?: never;
@@ -5549,10 +5569,11 @@ export interface components {
5549
5569
  */
5550
5570
  message: string;
5551
5571
  /**
5552
- * @description Where the rule was broken, as a path into the request: 'select', 'select[1].expression', 'select[1].alias', 'groupBy[0]', 'window.size', 'window.slide', 'having', 'orderBy[2].expression', 'limit', 'scanBudgetBytes', 'predicate', or 'query' for a failure that names no single item.
5572
+ * @description Where the rule was broken, as a path into the request: 'select', 'select[1].expression', 'select[1].alias', 'groupBy[0]', 'window.size', 'window.slide', 'having', 'orderBy[2].expression', 'sql', 'limit', 'scanBudgetBytes', 'predicate', or 'query' for a failure that names no single item.
5553
5573
  * @example select[1].alias
5554
5574
  */
5555
5575
  path: string;
5576
+ range?: components["schemas"]["AnalyticsDiagnosticRange"];
5556
5577
  };
5557
5578
  /** @description A change that resolves this diagnostic, when the server has verified one: today, the GROUP BY entry that makes an ungrouped SELECT expression valid. */
5558
5579
  AnalyticsDiagnosticFix: {
@@ -5562,10 +5583,33 @@ export interface components {
5562
5583
  */
5563
5584
  addGroupBy: string;
5564
5585
  };
5586
+ /** @description For a diagnostic on 'sql', the part of the query's text it is about, when the server can tell. */
5587
+ AnalyticsDiagnosticRange: {
5588
+ /**
5589
+ * Format: int32
5590
+ * @example 19
5591
+ */
5592
+ endColumn: number;
5593
+ /**
5594
+ * Format: int32
5595
+ * @example 3
5596
+ */
5597
+ endLine: number;
5598
+ /**
5599
+ * Format: int32
5600
+ * @example 7
5601
+ */
5602
+ startColumn: number;
5603
+ /**
5604
+ * Format: int32
5605
+ * @example 3
5606
+ */
5607
+ startLine: number;
5608
+ };
5565
5609
  AnalyticsDraftRequest: {
5566
- /** @description Dataset the query reads. Supplying it checks the scan budget against that dataset's ceiling and requires VIEW permission on it. */
5610
+ /** @description Dataset a builder query reads. Supplying it checks the scan budget against that dataset's ceiling and requires VIEW permission on it. A Grepr SQL query names its own dataset, which this must match when given. */
5567
5611
  datasetId?: string;
5568
- query: components["schemas"]["StructuredAnalyticsQuery"];
5612
+ query: components["schemas"]["AnalyticsQuery"];
5569
5613
  /**
5570
5614
  * Format: int64
5571
5615
  * @description Bytes the run may scan, checked against the organization's ceiling. Zero stands for a budget field left empty and is reported as a diagnostic.
@@ -5584,9 +5628,12 @@ export interface components {
5584
5628
  /** @description The call, in the analytics source language. */
5585
5629
  expression: string;
5586
5630
  };
5631
+ /** @description A column a query reads: its name, its type and, for a struct, its fields. */
5587
5632
  AnalyticsField: {
5588
5633
  /** @description Format string for a nested key accessor, when applicable. */
5589
5634
  accessorTemplate?: string;
5635
+ /** @description A struct column's fields, in order, each with its own fields when it is a struct. */
5636
+ fields?: components["schemas"]["AnalyticsField"][];
5590
5637
  name: string;
5591
5638
  type: string;
5592
5639
  };
@@ -5658,8 +5705,32 @@ export interface components {
5658
5705
  /** @description Complete analytical query to execute. */
5659
5706
  AnalyticsQuery: {
5660
5707
  type: string;
5661
- } & components["schemas"]["StructuredAnalyticsQuery"];
5662
- /** @description Dataset tables available to the query under logical aliases. */
5708
+ } & (components["schemas"]["StructuredAnalyticsQuery"] | components["schemas"]["SqlAnalyticsQuery"]);
5709
+ /** @description The outermost SELECT's GROUP BY, by result column name. */
5710
+ AnalyticsResultGrouping: {
5711
+ /** @description Whether every GROUP BY entry names a selected column. */
5712
+ allSelected?: boolean;
5713
+ /** @description The other GROUP BY keys' columns, in GROUP BY order. */
5714
+ keys: string[];
5715
+ /** @description The column of the first GROUP BY key that buckets a time, FLOOR(ts TO unit); null when none does. */
5716
+ time?: string;
5717
+ /**
5718
+ * @description The time bucket's unit; null with no time column.
5719
+ * @enum {string}
5720
+ */
5721
+ unit?: AnalyticsResultGroupingUnit;
5722
+ };
5723
+ /** @description What a Grepr SQL run's result columns are. Each column's kind comes from the type the engine reports for it; whether the rows are ordered and the grouping come from the query's outermost SELECT. */
5724
+ AnalyticsResultShape: {
5725
+ grouping?: components["schemas"]["AnalyticsResultGrouping"];
5726
+ /** @description Each column's kind, in the order of the record's columns. */
5727
+ kinds: AnalyticsResultShapeKinds[];
5728
+ /** @description Whether the outermost query has an ORDER BY, so the rows come in its order. */
5729
+ ordered?: boolean;
5730
+ /** @description Whether the query uses ROLLUP, CUBE or GROUPING SETS anywhere, so its rows may include subtotals that share keys with the rows they add up. */
5731
+ subtotals?: boolean;
5732
+ };
5733
+ /** @description Dataset tables a builder query reads, under logical aliases. A Grepr SQL query names its own dataset and tables, so its source has none. */
5663
5734
  AnalyticsTableBinding: {
5664
5735
  /** @description Logical table name used by the analytical query. */
5665
5736
  alias: string;
@@ -5714,6 +5785,10 @@ export interface components {
5714
5785
  promotedTagKeys?: string[];
5715
5786
  /** @description Words the analytics SQL grammar reserves; they cannot be used as result aliases. */
5716
5787
  reservedWords?: string[];
5788
+ /** @description The columns a Grepr SQL query reads from each table type it can read, by table key (logs_raw, spans_raw), in the order * returns them. */
5789
+ tableFields?: {
5790
+ [key: string]: components["schemas"]["AnalyticsField"][];
5791
+ };
5717
5792
  };
5718
5793
  AndEventPredicate: {
5719
5794
  /**
@@ -5959,8 +6034,8 @@ export interface components {
5959
6034
  * @default 107374182400
5960
6035
  */
5961
6036
  scanBudgetBytes?: number;
5962
- /** @description Dataset tables available to the query under logical aliases. */
5963
- tables: components["schemas"]["AnalyticsTableBinding"][];
6037
+ /** @description Dataset tables a builder query reads, under logical aliases. A Grepr SQL query names its own dataset and tables, so its source has none. */
6038
+ tables?: components["schemas"]["AnalyticsTableBinding"][];
5964
6039
  /**
5965
6040
  * @description Executes an analytical query against dataset tables using Athena. (enum property replaced by openapi-typescript)
5966
6041
  * @enum {string}
@@ -7425,6 +7500,13 @@ export interface components {
7425
7500
  */
7426
7501
  teamIds?: string[];
7427
7502
  };
7503
+ DatasetDataTypes: {
7504
+ /**
7505
+ * @description The data types the dataset holds, by table key: logs_raw (logs) and spans_raw (traces). A type is held once a pipeline that writes it to the dataset is created or updated, and then stays held, even after the pipeline stops or retention empties the table.
7506
+ * @default []
7507
+ */
7508
+ types: AnalyticsTableBindingTable[];
7509
+ };
7428
7510
  DatasetEstimationConfig: {
7429
7511
  /** Format: date-time */
7430
7512
  readonly createdAt?: string;
@@ -7695,6 +7777,8 @@ export interface components {
7695
7777
  };
7696
7778
  /** @description A streaming event record. Records are newline-separated as per the chunked output standard. Each record will contain a 'state' field and potentially a 'data' field. When the state is 'RUNNING', the 'data' field will be valid. In all other states, the 'data' field will be null. */
7697
7779
  EventRecord: {
7780
+ /** @description An analytics run's result column names, in the query's order. Sent once: on the first row's record, or on the terminal record when there are no rows. Null on every other record. */
7781
+ columns?: string[];
7698
7782
  data?: components["schemas"]["ReadableData"];
7699
7783
  /** @description The token that should be used by the client to send a heartbeat back to the server. This will usually only be set for the 'HEARTBEAT' state. Heartbeats back from the client are only required when heartbeatToken is not null. */
7700
7784
  heartbeatToken?: string;
@@ -7703,6 +7787,9 @@ export interface components {
7703
7787
  * @enum {string}
7704
7788
  */
7705
7789
  jobState: EventRecordJobState;
7790
+ /** @description Why a Grepr SQL run failed, in a sentence of the server's own, never the query engine's text. Set on that run's failed terminal record. Null on every other record. */
7791
+ message?: string;
7792
+ resultShape?: components["schemas"]["AnalyticsResultShape"];
7706
7793
  };
7707
7794
  ExactAttributesMergeStrategy: {
7708
7795
  /**
@@ -14021,6 +14108,45 @@ export interface components {
14021
14108
  */
14022
14109
  type: SplunkLogSinkType;
14023
14110
  };
14111
+ SqlAnalyticsQuery: {
14112
+ /** @description ID of the dataset whose tables the query reads. */
14113
+ datasetId: string;
14114
+ /**
14115
+ * Format: date-time
14116
+ * @description End of the time interval every table covers.
14117
+ */
14118
+ end: string;
14119
+ /**
14120
+ * Format: int32
14121
+ * @description The most rows returned. A LIMIT in the query can only lower it.
14122
+ * @default 2500
14123
+ */
14124
+ limit?: number;
14125
+ /** @description One read-only Grepr SQL query. It reads only the tables' aliases, each bounded by the time range and its filter everywhere the query names it. */
14126
+ sql: string;
14127
+ /**
14128
+ * Format: date-time
14129
+ * @description Start of the time interval every table covers.
14130
+ */
14131
+ start: string;
14132
+ /** @description The tables the query reads, each under its own alias. */
14133
+ tables: components["schemas"]["SqlAnalyticsTable"][];
14134
+ /**
14135
+ * @description discriminator enum property added by openapi-typescript
14136
+ * @enum {string}
14137
+ */
14138
+ type: SqlAnalyticsQueryType;
14139
+ };
14140
+ SqlAnalyticsTable: {
14141
+ /** @description The name the SQL reads the table by. Unique within the query, ignoring case. */
14142
+ alias: string;
14143
+ filter: components["schemas"]["EventPredicate"];
14144
+ /**
14145
+ * @description The dataset's table the alias reads: `logs_raw` for logs, `spans_raw` for traces.
14146
+ * @enum {string}
14147
+ */
14148
+ table: AnalyticsTableBindingTable;
14149
+ };
14024
14150
  /** @description Base class for SQL statements */
14025
14151
  SqlExecutable: {
14026
14152
  eventTimeAttribute?: string;
@@ -15652,8 +15778,8 @@ export interface components {
15652
15778
  * @default 107374182400
15653
15779
  */
15654
15780
  scanBudgetBytes?: number;
15655
- /** @description Dataset tables available to the query under logical aliases. */
15656
- tables: components["schemas"]["AnalyticsTableBinding"][];
15781
+ /** @description Dataset tables a builder query reads, under logical aliases. A Grepr SQL query names its own dataset and tables, so its source has none. */
15782
+ tables?: components["schemas"]["AnalyticsTableBinding"][];
15657
15783
  /**
15658
15784
  * @description Executes an analytical query using a Trino query engine. (enum property replaced by openapi-typescript)
15659
15785
  * @enum {string}
@@ -16863,6 +16989,7 @@ export type SchemaAllQueryNode = components["schemas"]["AllQueryNode"];
16863
16989
  export type SchemaAnalyticsCompletion = components["schemas"]["AnalyticsCompletion"];
16864
16990
  export type SchemaAnalyticsDiagnostic = components["schemas"]["AnalyticsDiagnostic"];
16865
16991
  export type SchemaAnalyticsDiagnosticFix = components["schemas"]["AnalyticsDiagnosticFix"];
16992
+ export type SchemaAnalyticsDiagnosticRange = components["schemas"]["AnalyticsDiagnosticRange"];
16866
16993
  export type SchemaAnalyticsDraftRequest = components["schemas"]["AnalyticsDraftRequest"];
16867
16994
  export type SchemaAnalyticsDraftResponse = components["schemas"]["AnalyticsDraftResponse"];
16868
16995
  export type SchemaAnalyticsExample = components["schemas"]["AnalyticsExample"];
@@ -16873,6 +17000,8 @@ export type SchemaAnalyticsOrderBy = components["schemas"]["AnalyticsOrderBy"];
16873
17000
  export type SchemaAnalyticsParameter = components["schemas"]["AnalyticsParameter"];
16874
17001
  export type SchemaAnalyticsProjection = components["schemas"]["AnalyticsProjection"];
16875
17002
  export type SchemaAnalyticsQuery = components["schemas"]["AnalyticsQuery"];
17003
+ export type SchemaAnalyticsResultGrouping = components["schemas"]["AnalyticsResultGrouping"];
17004
+ export type SchemaAnalyticsResultShape = components["schemas"]["AnalyticsResultShape"];
16876
17005
  export type SchemaAnalyticsTableBinding = components["schemas"]["AnalyticsTableBinding"];
16877
17006
  export type SchemaAnalyticsTimeWindow = components["schemas"]["AnalyticsTimeWindow"];
16878
17007
  export type SchemaAnalyticsVocabularyResponse = components["schemas"]["AnalyticsVocabularyResponse"];
@@ -16972,6 +17101,7 @@ export type SchemaDatadogStatsSink = components["schemas"]["DatadogStatsSink"];
16972
17101
  export type SchemaDatadogTraceAgentSource = components["schemas"]["DatadogTraceAgentSource"];
16973
17102
  export type SchemaDatadogTraceSink = components["schemas"]["DatadogTraceSink"];
16974
17103
  export type SchemaDatasetCreate = components["schemas"]["DatasetCreate"];
17104
+ export type SchemaDatasetDataTypes = components["schemas"]["DatasetDataTypes"];
16975
17105
  export type SchemaDatasetEstimationConfig = components["schemas"]["DatasetEstimationConfig"];
16976
17106
  export type SchemaDatasetRead = components["schemas"]["DatasetRead"];
16977
17107
  export type SchemaDatasetUpdate = components["schemas"]["DatasetUpdate"];
@@ -17320,6 +17450,8 @@ export type SchemaSplunk = components["schemas"]["Splunk"];
17320
17450
  export type SchemaSplunkLogAgentSource = components["schemas"]["SplunkLogAgentSource"];
17321
17451
  export type SchemaSplunkLogHttpSource = components["schemas"]["SplunkLogHttpSource"];
17322
17452
  export type SchemaSplunkLogSink = components["schemas"]["SplunkLogSink"];
17453
+ export type SchemaSqlAnalyticsQuery = components["schemas"]["SqlAnalyticsQuery"];
17454
+ export type SchemaSqlAnalyticsTable = components["schemas"]["SqlAnalyticsTable"];
17323
17455
  export type SchemaSqlExecutable = components["schemas"]["SqlExecutable"];
17324
17456
  export type SchemaSqlIoStatement = components["schemas"]["SqlIoStatement"];
17325
17457
  export type SchemaSqlNode = components["schemas"]["SqlNode"];
@@ -19655,6 +19787,35 @@ export interface operations {
19655
19787
  };
19656
19788
  };
19657
19789
  };
19790
+ getDatasetDataTypes: {
19791
+ parameters: {
19792
+ query?: never;
19793
+ header?: never;
19794
+ path: {
19795
+ id: string;
19796
+ };
19797
+ cookie?: never;
19798
+ };
19799
+ requestBody?: never;
19800
+ responses: {
19801
+ /** @description The types the dataset holds. */
19802
+ 200: {
19803
+ headers: {
19804
+ [name: string]: unknown;
19805
+ };
19806
+ content: {
19807
+ "application/json": components["schemas"]["DatasetDataTypes"];
19808
+ };
19809
+ };
19810
+ /** @description Dataset not found. */
19811
+ 404: {
19812
+ headers: {
19813
+ [name: string]: unknown;
19814
+ };
19815
+ content?: never;
19816
+ };
19817
+ };
19818
+ };
19658
19819
  getDatasetEstimationConfig: {
19659
19820
  parameters: {
19660
19821
  query?: never;
@@ -30314,6 +30475,21 @@ export declare enum AnalyticsParameterType {
30314
30475
  TIME_UNIT = "TIME_UNIT",
30315
30476
  LITERAL = "LITERAL"
30316
30477
  }
30478
+ export declare enum AnalyticsResultGroupingUnit {
30479
+ SECOND = "SECOND",
30480
+ MINUTE = "MINUTE",
30481
+ HOUR = "HOUR",
30482
+ DAY = "DAY",
30483
+ WEEK = "WEEK",
30484
+ MONTH = "MONTH",
30485
+ QUARTER = "QUARTER",
30486
+ YEAR = "YEAR"
30487
+ }
30488
+ export declare enum AnalyticsResultShapeKinds {
30489
+ TIME = "TIME",
30490
+ NUMBER = "NUMBER",
30491
+ OTHER = "OTHER"
30492
+ }
30317
30493
  export declare enum AnalyticsTableBindingTable {
30318
30494
  logs_raw = "logs_raw",
30319
30495
  logs_dedup = "logs_dedup",
@@ -31083,6 +31259,9 @@ export declare enum SplunkLogHttpSourceType {
31083
31259
  export declare enum SplunkLogSinkType {
31084
31260
  splunk_log_sink = "splunk-log-sink"
31085
31261
  }
31262
+ export declare enum SqlAnalyticsQueryType {
31263
+ sql_analytics_query = "sql-analytics-query"
31264
+ }
31086
31265
  export declare enum SqlIoStatementType {
31087
31266
  sql_io = "sql_io"
31088
31267
  }