Skip to content

Commit

Permalink
fix: unauthorized error while extracting large entities
Browse files Browse the repository at this point in the history
  • Loading branch information
lorransr committed Mar 11, 2024
1 parent 38e8d83 commit 831d2c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
9 changes: 0 additions & 9 deletions tap_superset/auth.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import requests

_TOKEN = None


def get_auth_token(base_url, username, password):
global _TOKEN
if _TOKEN is None:
_TOKEN = fetch_token(base_url, username, password)
return _TOKEN


def fetch_token(base_url, username, password):
headers = {
"accept": "application/json",
"Content-Type": "application/json",
Expand Down
6 changes: 2 additions & 4 deletions tap_superset/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

import sys
import json
import logging
from typing import Any, Callable, Iterable, List
from typing import Any, Callable, Iterable

import requests
from singer_sdk.authenticators import BearerTokenAuthenticator
Expand All @@ -32,9 +31,8 @@ def url_base(self) -> str:
"""Return the API URL root, configurable via tap settings."""
return self.config["base_url"]

records_jsonpath = "$[*]" # Or override `parse_response`.
records_jsonpath = "$[*]"

# Set this value or override `get_new_paginator`.
next_page_token_jsonpath = "$.next_page" # noqa: S105

@property
Expand Down

0 comments on commit 831d2c5

Please sign in to comment.