Skip to content

Commit

Permalink
Fix/serverless (#127)
Browse files Browse the repository at this point in the history
* added fix for serverless

* fixed bug

* fixed formatting

* Formatted failing files
  • Loading branch information
souravg-db2 authored Jan 8, 2025
1 parent 4176d16 commit e632b63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions discoverx/common/helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module contains common utility functions used throughout the package
"""

import sys


Expand Down
8 changes: 5 additions & 3 deletions discoverx/dx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pandas as pd
import os
from pyspark.sql import SparkSession
from typing import List, Optional, Union
from discoverx import logging
Expand Down Expand Up @@ -40,9 +41,10 @@ def __init__(
self.logger = logging.Logging()

self.rules = Rules(custom_rules=custom_rules, locale=locale)
self.uc_enabled = (os.getenv("IS_SERVERLESS", "FALSE").lower() == "true" or self.spark.conf.get(
"spark.databricks.unityCatalog.enabled", "false") == "true")

self.uc_enabled = (
os.getenv("IS_SERVERLESS", "FALSE").lower() == "true"
or self.spark.conf.get("spark.databricks.unityCatalog.enabled", "false") == "true"
)
self.scanner: Optional[Scanner] = None
self._scan_result: Optional[ScanResult] = None

Expand Down
1 change: 1 addition & 0 deletions discoverx/msql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the M-SQL compiler"""

from dataclasses import dataclass
from functools import reduce
from discoverx import logging
Expand Down

0 comments on commit e632b63

Please sign in to comment.