-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
🎉 Google Analytics connector is failing #3648
Merged
Merged
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0043874
added filter of streams and deleted duplicated title in spec.json
po3na4skld 21b52b0
fixed discover returns empty streams
po3na4skld e81a465
pr changes
po3na4skld 4d096bc
pr changes
po3na4skld c5321ce
chmod on files changed
po3na4skld d2755bd
chmod on files changed
po3na4skld 5d5ca42
chmod on files changed
po3na4skld 6fed47d
added acceptance tests
po3na4skld 5253387
added pre commit config
po3na4skld e77c90b
fixed chmod on amazon and facebook files
po3na4skld f5ae757
fixed chmod on amazon and facebook files
po3na4skld ba92bc6
version bump
po3na4skld 668fd75
version bump
po3na4skld 0a13233
Merge branch 'master' into KC-Google-Analytics-Connector-is-failing
po3na4skld 13f6345
build file fix
po3na4skld 43a2be5
removed unrelated files
po3na4skld 12b5225
removed unrelated files
po3na4skld 83c7e76
removed unrelated files
po3na4skld 6095166
removed unrelated files
po3na4skld 1de9852
removed unrelated files
po3na4skld d1775f1
removed unrelated files
po3na4skld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file modified
0
airbyte-integrations/bases/base-python/base_python/__init__.py
100644 → 100755
Empty file.
Empty file modified
0
...egrations/connectors/source-facebook-marketing/source_facebook_marketing/client/client.py
100644 → 100755
Empty file.
Empty file modified
0
airbyte-integrations/connectors/source-googleanalytics-singer/main_dev.py
100644 → 100755
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
from pathlib import Path | ||
from typing import List | ||
|
||
from airbyte_protocol import ConfiguredAirbyteCatalog | ||
from base_singer import AirbyteLogger, BaseSingerSource | ||
from jsonschema.validators import Draft4Validator | ||
from tap_google_analytics import GAClient | ||
|
@@ -42,6 +43,7 @@ class GoogleAnalyticsSingerSource(BaseSingerSource): | |
tap_cmd = "tap-google-analytics" | ||
tap_name = "Google Analytics API" | ||
api_error = Exception | ||
reports_to_read = None | ||
|
||
# can be overridden to change an input config | ||
def configure(self, raw_config: json, temp_dir: str) -> json: | ||
|
@@ -59,19 +61,28 @@ def _validate_custom_reports(self, custom_reports_data: List[dict]): | |
error_messages.append(error.message) | ||
raise Exception("An error occurred during custom_reports data validation: " + "; ".join(error_messages)) | ||
|
||
def read_catalog(self, catalog_path: str) -> ConfiguredAirbyteCatalog: | ||
catalog = ConfiguredAirbyteCatalog.parse_obj(self.read_config(catalog_path)) | ||
if not self.reports_to_read: | ||
self.reports_to_read = [i.stream.name for i in catalog.streams] | ||
return catalog_path | ||
|
||
def _get_reports_file_path(self, temp_dir: str, custom_reports_data: List[dict]) -> str: | ||
report_definition = ( | ||
json.loads(pkgutil.get_data("tap_google_analytics", "defaults/default_report_definition.json")) + custom_reports_data | ||
) | ||
if self.reports_to_read is not None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
report_definition = [i for i in report_definition if i["name"] in self.reports_to_read] | ||
|
||
custom_reports = os.path.join(temp_dir, "custom_reports.json") | ||
with open(custom_reports, "w") as file: | ||
file.write(json.dumps(report_definition)) | ||
|
||
return custom_reports | ||
|
||
def _check_custom_reports(self, config: dict = None, config_path: str = None): | ||
if config_path: | ||
config = self.read_config(config_path) | ||
|
||
custom_reports = config.pop("custom_reports") | ||
if custom_reports.strip() and json.loads(custom_reports): | ||
custom_reports_data = json.loads(custom_reports) | ||
|
This file contains 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
Empty file modified
0
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/source.py
100644 → 100755
Empty file.
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.
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.
this method is not called anywhere?
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.
It is called when performing read operation, I redefined this function from a base class to save and then filter out streams we want to use
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.
@po3na4skld, This method is called during the Read method, and when the Discover method is launched, no one stream will found, so we will get zero streams and we will not be able to read the data.
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.
I got it
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.
@yevhenii-ldv for now it works as before