Skip to content

Commit

Permalink
Fix open-metadata#14089: cleaned code, improved docstrings, added cop…
Browse files Browse the repository at this point in the history
…yright info
  • Loading branch information
harshsoni2024 committed Mar 26, 2024
1 parent 276a184 commit 380e080
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions ingestion/src/metadata/examples/workflows/qlikcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ workflowConfig:
authProvider: openmetadata
securityConfig:
jwtToken: "eyJraWQiOiJHYjM4OWEtOWY3Ni1nZGpzLWE5MmotMDI0MmJrOTQzNTYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzQm90IjpmYWxzZSwiaXNzIjoib3Blbi1tZXRhZGF0YS5vcmciLCJpYXQiOjE2NjM5Mzg0NjIsImVtYWlsIjoiYWRtaW5Ab3Blbm1ldGFkYXRhLm9yZyJ9.tS8um_5DKu7HgzGBzS1VTA5uUjKWOCU0B_j08WXBiEC0mr0zNREkqVfwFDD-d24HlNEbrqioLsBuFRiwIWKc1m_ZlVQbG7P36RUxhuv2vbSp80FKyNM-Tj93FDzq91jsyNmsQhyNv_fNr3TXfzzSPjHt8Go0FMMP66weoKMgW2PbXlhVKwEuXUHyakLLzewm9UMeQaEiRzhiTMU3UkLXcKbYEJJvfNFcLwSl9W8JCO_l0Yj3ud-qt_nQYEZwqW6u5nfdQllN133iikV4fM5QZsMCnm8Rq1mvLR0y9bmJiD7fwM1tmJ791TUWqmKaTnP49U493VanKpUAfzIiOiIbhg"
ingestionPipelineFQN: qlikcloud_pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def __init__(
self.config = config
self.socket_connection = None

# self.config.token = f"{self.config.token}"
client_config: ClientConfig = ClientConfig(
base_url=self.config.hostPort,
api_version=API_VERSION,
Expand Down Expand Up @@ -103,7 +102,6 @@ def get_dashboard_charts(self, dashboard_id: str) -> List[QlikSheet]:
"""
try:
self.connect_websocket(dashboard_id)
# self._websocket_send_request(request=None)
OPEN_DOC_REQ.update({"params": [dashboard_id]})
self._websocket_send_request(OPEN_DOC_REQ)
self._websocket_send_request(CREATE_SHEET_SESSION)
Expand All @@ -129,7 +127,7 @@ def get_dashboards_list(self) -> List[QlikAppList]:
logger.warning("Failed to fetch the app list")
return []

def get_dashboard_details(self, dashboard_id: str):
def get_dashboard_details(self, dashboard_id: str) -> Optional[QlikAppDetails]:
"""
Get App Details
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
QlikCloud Constants
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Metabase Models
QlikCloud Models
"""
from typing import List, Optional, Union

Expand All @@ -19,7 +19,7 @@
# App
class QlikApp(BaseModel):
"""
Metabase dashboard model
QlikCloud App model
"""

description: Optional[str]
Expand All @@ -34,7 +34,7 @@ class QlikAppList(BaseModel):

class QlikAppDetails(BaseModel):
"""
Metabase app details model
Qlik App details model
"""

description: Optional[str]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"token": {
"title": "token",
"description": "token to connect to Qlik Cloud.",
"type": "string"
"type": "string",
"format": "password"
},
"hostPort": {
"expose": true,
Expand Down

0 comments on commit 380e080

Please sign in to comment.