Skip to content
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

Issues with new compareReportSuites function #55

Closed
frederikwerner opened this issue May 2, 2021 · 3 comments
Closed

Issues with new compareReportSuites function #55

frederikwerner opened this issue May 2, 2021 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@frederikwerner
Copy link

I was trying out the (fantastically useful!) compareReportSuites function and encountered some problems:

  1. When using the "dimensions" comparison, there is an error thrown when including certain report suites. From my observation, the error might come from the report suites having the mobile app dimensions enabled, which is the only observed difference from other, non-problematic report suites. The "metrics" comparison does not produce this error. The error message is:
  File "C:\Python\lib\site-packages\aanalytics2\aanalytics2.py", line 1827, in compareReportSuites
    listDFs = [self.getDimensions(rsid) for rsid in listRsids]
  File "C:\Python\lib\site-packages\aanalytics2\aanalytics2.py", line 1827, in <listcomp>
    listDFs = [self.getDimensions(rsid) for rsid in listRsids]
  File "C:\Python\lib\site-packages\aanalytics2\aanalytics2.py", line 593, in getDimensions
    df_dims = df_dims[columns]
  File "C:\Python\lib\site-packages\pandas\core\frame.py", line 3030, in __getitem__
    indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
  File "C:\Python\lib\site-packages\pandas\core\indexing.py", line 1266, in _get_listlike_indexer
    self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
  File "C:\Python\lib\site-packages\pandas\core\indexing.py", line 1316, in _validate_read_indexer
    raise KeyError(f"{not_found} not in index")
KeyError: "['parent'] not in index"
  1. When using the "save" parameter, the name of the file is the same for the "dimensions" and "metrics" comparison. If both are executed in one run of a script, one file overwrites the other. Ideally, the file names would be different for those two versions. Generally it might be a good idea to include a timestamp in the file name, so that the same script can be run multiple times without overwriting previous data. The latter point is basically true for every function that can save the result.
  2. When a dimension or metric is not active in one report suite but active in another, the comparison claims they are equal. From my expectation, having a different activation status should also yield a "different" comparison result, because this is how it would show in the analytics admin interface.

Overall: Great work and thank you again for the awesome functionality!

@pitchmuc pitchmuc self-assigned this May 2, 2021
@pitchmuc pitchmuc added bug Something isn't working enhancement New feature or request labels May 2, 2021
@pitchmuc
Copy link
Owner

pitchmuc commented May 3, 2021

Thanks for filling the bug @frederikwerner.

  1. I had the issue with "description" as well, and I had to remove it as default return elements because for some reportSuites it was not present. It was not deem essential in a comparison. For "parent", it may be trickier, as it is important that parents are identical.
  2. This has been updated so you will see if it is a dimension or a metrics comparison. Also added the timestamp. I forgot to add it. I need to change all the save options that is true. I may take the opportunity, hence update may take a while.
  3. This is very strange. I need to investigate.

@pitchmuc
Copy link
Owner

pitchmuc commented May 3, 2021

I changed the default comparison to include all of the possible columns.
Could you test the last commit 2f76cb1 ?
A pip install git+https://github.com/pitchmuc/adobe-analytics-api-2.0.git@2f76cb129b3e0582988a9ce9ae6b22124f9cc76f should install the latest version on your machine without requiring me to do a pypi import.

@frederikwerner
Copy link
Author

Tested and looks good for my use case! Will test the other two tomorrow.

@pitchmuc pitchmuc closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants