-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial preparation for supporting writing to any/all cdf targets #435
Conversation
Codecov Report
@@ Coverage Diff @@
## master #435 +/- ##
==========================================
+ Coverage 83.72% 83.75% +0.03%
==========================================
Files 98 108 +10
Lines 16064 16453 +389
Branches 2489 2492 +3
==========================================
+ Hits 13449 13780 +331
- Misses 1870 1921 +51
- Partials 745 752 +7
|
b7b5102
to
fa3bd31
Compare
0d51110
to
5722538
Compare
d71ee13
to
70fe544
Compare
{ | ||
IRawWriter Raw { get; } | ||
ITimeseriesWriter Timeseries { get; } | ||
ITimeseriesWriter MinimalTimeseries { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this, and use an abstraction instead, so the Timeseries field is either a MinimalTimeseriesWriter, or FullTimeseriesWriter.
var tss = ids.Select(id => tsMap[id]); | ||
var creates = tss.Select( | ||
ts => | ||
ts.ToTimeseries( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split the ToTimeseries method as well, and call it from subclasses of some BaseTimeseriesWriter class.
} | ||
}; | ||
} | ||
if (config.Cognite?.FlexibleDataModels != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this mapping, because this isn't public.
schema/cognite_config.schema.json
Outdated
@@ -57,6 +59,100 @@ | |||
} | |||
} | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these blocks entirely.
Extractor/Config/CogniteConfig.cs
Outdated
{ | ||
public bool Assets { get; set; } = true; | ||
public bool Timeseries { get; set; } = true; | ||
public bool Relationships { get; set; } = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These shouldn't be true by default
Extractor/Config/CogniteConfig.cs
Outdated
/// <summary> | ||
/// Clean metadata targets config | ||
/// </summary> | ||
public CleanMetadataTargetConfig? CleanMetadata { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just call this clean
, and raw
Extractor/Config/CogniteConfig.cs
Outdated
/// <summary> | ||
/// FDM destination config | ||
/// </summary> | ||
public FdmDestinationConfig? FlexibleDataModels { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be data-models
schema/cognite_config.schema.json
Outdated
"assets-table": { | ||
"type": "string", | ||
"description": "Raw table to use for assets" | ||
"raw-metadata": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed the name of these in config, need to update here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think you need to update the example config file.
No description provided.