Skip to content

Commit

Permalink
feat(py-sdk): add cli version to ingestion headers (#11847)
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Richert <hendrik.richert@swisscom.com>
Co-authored-by: Shirshanka Das <shirshanka+github@gmail.com>
  • Loading branch information
3 people authored Nov 18, 2024
1 parent 3e128f4 commit 37fa076
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metadata-ingestion/src/datahub/emitter/rest_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from requests.adapters import HTTPAdapter, Retry
from requests.exceptions import HTTPError, RequestException

from datahub import nice_version_name
from datahub.cli import config_utils
from datahub.cli.cli_utils import ensure_has_system_metadata, fixup_gms_url
from datahub.configuration.common import ConfigurationError, OperationalError
Expand Down Expand Up @@ -91,6 +92,7 @@ def __init__(
self._session.headers.update(
{
"X-RestLi-Protocol-Version": "2.0.0",
"X-DataHub-Py-Cli-Version": nice_version_name(),
"Content-Type": "application/json",
}
)
Expand Down

0 comments on commit 37fa076

Please sign in to comment.