python-omniture icon indicating copy to clipboard operation
python-omniture copied to clipboard

Contribute to Data Warehouse support?

Open tomrijntjes opened this issue 8 years ago • 5 comments

I noticed Adobe doesn't support DW yet for their v1.4 endpoint. Overriding the endpoint by running analytics = omniture.authenticate(account, secret ,endpoint="https://api.omniture.com/admin/1.3/rest/") breaks stuff down the line.

Did you explore implementing support for DW? What's the status and how can I contribute?

tomrijntjes avatar Dec 12 '16 12:12 tomrijntjes

Very feasible now that Adobe updated the DW api to 1.4 https://marketing.adobe.com/developer/documentation/data-warehouse/r-report-2 just haven't had a chance to implement it. Would love contributions. Just submit a pull request a pull request.

One thing to keep in mind. DW has a slightly different set of elements and metrics. You can get the list of elements and metrics by using the Report.GetMetrics, and Report.GetElements using this.

{
"reportSuiteID":"somersid",	
"reportType":"warehouse"
}

dancingcactus avatar Feb 28 '17 22:02 dancingcactus

Hey Justin, cool, I'll take a look when I can! Currently my company is running a scheduled ftp dump which is not very practical to reconfigure. Might as well make this work for the community.

Cheers,

Tom

2017-02-28 23:14 GMT+01:00 Justin Grover [email protected]:

Very feasible now that Adobe updated the DW api to 1.4 https://marketing.adobe.com/developer/documentation/data- warehouse/r-report-2 just haven't had a chance to implement it. Would love contributions. Just submit a pull request a pull request.

One thing to keep in mind. DW has a slightly different set of elements and metrics. You can get the list of elements and metrics by using the Report.GetMetrics, and Report.GetElements using this.

{"reportSuiteID":"somersid", "reportType":"warehouse" }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dancingcactus/python-omniture/issues/54#issuecomment-283178402, or mute the thread https://github.com/notifications/unsubscribe-auth/AEB47zBWyeBetUA-QSIf7KQU9GuwnQtzks5rhJxDgaJpZM4LKe8H .

-- Met vriendelijke groet,

Tom Rijntjes

LinkedIn http://www.linkedin.com/in/tomrijntjes skype: tom.rijntjes

tomrijntjes avatar Mar 02 '17 11:03 tomrijntjes

Cool. Look forward to it if it works out.

dancingcactus avatar Mar 02 '17 18:03 dancingcactus

I looked into it briefly today. The docs promise an interface that is similar to the other datasources so I figured the lower level interface might suffice. You have to specify the source attribute and it looks like the date ranges work slightly differently.

However, running:

query = suite.report.element('entrypage').metric('totalorders').set(source='warehouse').set(dateFrom='2017-03-15').set(dateTo='2017-03-15').async()
while not query.check():
	time.sleep(1)
report = query.get_report()

Leads to the not-so-helpful complaint:


error {u'error_uri': None, u'error_description': u'Warehouse request failed', u'error': u'warehouse_request_failed'}
Traceback (most recent call last):
File "run.py", line 24, in <module>
  while not query.check():
File "/python-omniture/omniture/query.py", line 376, in check
  return self.is_ready()
File "/python-omniture/omniture/query.py", line 322, in is_ready
  response = self.suite.request('Report','Get',{'reportID': self.id})
File "/python-omniture/omniture/account.py", line 165, in request
  return self.account.request(api, method, raw_query)
File "/python-omniture/omniture/account.py", line 103, in request
  raise reports.InvalidReportError(json_response)
omniture.reports.InvalidReportError: warehouse_request_failed: Warehouse request failed (None)
datawarehouse_omnituretest_1 exited with code 1

Not sure how to move forward with this.

tomrijntjes avatar Mar 16 '17 12:03 tomrijntjes

For a data warehouse request you would need to provide an email address or an object containing FTP details. Could these be set with .set()? Email perhaps, but FTP is a collection of values:

"ftp": {
	"host": "hostname",
	"port": "port",
	"directory": "directory",
	"username": "username",
	"password": "password",
	"filename": "filename"
} 

ohnosee avatar Nov 19 '18 14:11 ohnosee