great-expectations / great_expectations

Always know what to expect from your data.
https://docs.greatexpectations.io/
Apache License 2.0
9.71k stars 1.5k forks source link

How do we disable uploading data to posthog.greatexpectations.io endpoint in GX 1.0.0a4? #9966

Open satniks opened 2 months ago

satniks commented 2 months ago

I am trying great-expectations v1.0.0a4 and while executing my existing v0.18.x based code, I got error due to interface change from 0.18.x to v1.x.

AttributeError: 'EphemeralDataContext' object has no attribute 'sources'

But then I was surprised to see following message at the end. error uploading: HTTPSConnectionPool(host='posthog.greatexpectations.io', port=443): Max retries exceeded with url : /batch/

How can we disable uploading data to the posthog endpoint used for analytics? I feel it should be disabled by default.

satniks commented 2 months ago

I noticed that in the file great_expectations/analytics/config.py, analytics is enabled by default. It should be disabled and whoever needs analytics should enable it.

Anyway, I was able to disable using following code:

from great_expectations.analytics.config import ENV_CONFIG ENV_CONFIG.gx_analytics_enabled = False