CDAP-15860 Facebook Ads (SaaS source) - batch source - #1
Open
YevheniiChekanskyi wants to merge 18 commits into
Open
CDAP-15860 Facebook Ads (SaaS source) - batch source#1YevheniiChekanskyi wants to merge 18 commits into
YevheniiChekanskyi wants to merge 18 commits into
Conversation
mlozbin-cybervisiontech
suggested changes
Sep 13, 2019
| /** | ||
| * Base configuration for facebook sources. | ||
| */ | ||
| public class BaseSourceConfig extends ReferencePluginConfig { |
There was a problem hiding this comment.
will facebook have many source plugins?
Owner
Author
There was a problem hiding this comment.
yes, streaming source is planned.
|
|
||
| DataSetManager<Table> outputManager = getDataset("outputSink"); | ||
| List<StructuredRecord> outputRecords = MockSink.readOutput(outputManager); | ||
| System.out.println(); |
| workflowManager.startAndWaitForRun(ProgramRunStatus.COMPLETED, 5, TimeUnit.MINUTES); | ||
|
|
||
| DataSetManager<Table> outputManager = getDataset("outputSink"); | ||
| List<StructuredRecord> outputRecords = MockSink.readOutput(outputManager); |
|
|
||
| @Test | ||
| @SuppressWarnings("unchecked") | ||
| public void testIterate() throws IOException, APIException { |
There was a problem hiding this comment.
this test is not very readable and maintainable. What about replacing it with functional test?
| @@ -0,0 +1,104 @@ | |||
| { | |||
There was a problem hiding this comment.
looks like you miss image and docs
Fix validations. Put breakdowns to schema automatically. Add icon.
…ng widget and validation.
…kdown dropdown widget.
…idgets for obj ids.
…ange to date_preset
mlozbin-cybervisiontech
suggested changes
Sep 30, 2019
| <_exportcontents>io.cdap.plugin.facebook.*</_exportcontents> | ||
| <Embed-Directory>lib</Embed-Directory> | ||
| <!--Only @Plugin classes in the export packages will be included as plugin--> | ||
| <_exportcontents>io.cdap.*</_exportcontents> |
|
|
||
| public class FacebookBatchSourceConfigTest { | ||
|
|
||
| static class FacebookBatchSourceConfigMock extends FacebookBatchSourceConfig { |
There was a problem hiding this comment.
can you use builder like in other plugins?
| import org.junit.Test; | ||
|
|
||
| public class BaseSourceConfigTest { | ||
| static class BaseSourceConfigMock extends BaseSourceConfig { |
There was a problem hiding this comment.
same question about builder
| MockFailureCollector failureCollector = new MockFailureCollector(); | ||
| config.validateFields(failureCollector); | ||
|
|
||
| Assert.assertEquals(1, failureCollector.getValidationFailures().size()); |
There was a problem hiding this comment.
can you use validation utils like in other configs? I don't think testing failures count is enough.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.cask.co/browse/CDAP-15860
DOC: https://wiki.cask.co/display/CE/Facebook+Ads
As part of this PR batch source for facebook insights api was created.