Skip to content

Commit

Permalink
Add dataset.type
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Jun 16, 2020
1 parent e67d5e7 commit fbcf50c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Ingest Manager - storedDatasourcesToAgentInputs', () => {
id: 'some-uuid',
name: 'mock-datasource',
type: 'test-logs',
dataset: { namespace: 'default' },
dataset: { namespace: 'default', type: 'test-logs' },
use_output: 'default',
streams: [
{
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('Ingest Manager - storedDatasourcesToAgentInputs', () => {
id: 'some-uuid',
name: 'mock-datasource',
type: 'test-logs',
dataset: { namespace: 'default' },
dataset: { namespace: 'default', type: 'test-logs' },
use_output: 'default',
streams: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const storedDatasourcesToAgentInputs = (
id: datasource.id || datasource.name,
name: datasource.name,
type: input.type,
dataset: { namespace: datasource.namespace || 'default' },
dataset: {
namespace: datasource.namespace || 'default',
type: input.type,
},
use_output: DEFAULT_OUTPUT.name,
...Object.entries(input.config || {}).reduce((acc, [key, { value }]) => {
acc[key] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export interface FullAgentConfigInput {
id: string;
name: string;
type: string;
dataset: { namespace: string };
dataset: {
namespace: string;
type: string;
};
use_output: string;
package?: Pick<DatasourcePackage, 'name' | 'version'>;
streams: FullAgentConfigInputStream[];
Expand Down

0 comments on commit fbcf50c

Please sign in to comment.