Skip to content

Commit

Permalink
Source Google Analytics: Specify integer for dimension ga:dateHourMin…
Browse files Browse the repository at this point in the history
…ute (#14298)

* Specify integer for dimension ga:dateHourMinute
* Update changelog
  • Loading branch information
arsenlosenko authored Jun 30, 2022
1 parent 0fb4b36 commit a1e96ef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ COPY main.py ./
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.21
LABEL io.airbyte.version=0.1.22
LABEL io.airbyte.name=airbyte/source-google-analytics-v4
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ def lookup_data_type(self, field_type: str, attribute: str) -> str:
# strings
return "string"

elif attribute.startswith("ga:dateHourMinute"):
return "integer"

attr_type = self.dimensions_ref[attribute]

elif field_type == "metric":
# Custom Google Analytics Metrics {ga:goalXXStarts, ga:metricXX, ... }
# We always treat them as strings as we can not be sure of their data type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_metrics_dimensions_type_list(mock_metrics_dimensions_type_list_link):
def get_metrics_dimensions_mapping():
test_metrics_dimensions_map = {
"metric": [("ga:users", "integer"), ("ga:newUsers", "integer")],
"dimension": [("ga:dimension", "string")],
"dimension": [("ga:dimension", "string"), ("ga:dateHourMinute", "integer")],
}
for field_type, attribute_expected_pairs in test_metrics_dimensions_map.items():
for attribute_expected_pair in attribute_expected_pairs:
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/google-analytics-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Incremental sync is supported only if you add `ga:date` dimension to your custom

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:---------------------------------------------------------------------------------------------|
| 0.1.22 | 2022-06-30 | [14298](https://github.com/airbytehq/airbyte/pull/14298) | Specify integer type for ga:dateHourMinute dimension
| 0.1.21 | 2022-04-30 | [12500](https://github.com/airbytehq/airbyte/pull/12500) | Improve input configuration copy |
| 0.1.20 | 2022-04-28 | [12426](https://github.com/airbytehq/airbyte/pull/12426) | Expose `isDataGOlden` field and always resync data two days back to make sure it is golden |
| 0.1.19 | 2022-04-19 | [12150](https://github.com/airbytehq/airbyte/pull/12150) | Minor changes to documentation |
Expand Down

0 comments on commit a1e96ef

Please sign in to comment.