Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bcmeireles committed Jan 7, 2025
1 parent d544450 commit 0c8a09b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions dbt/adapters/dremio/api/rest/entities/reflection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from enum import Enum


class TransformType(Enum):
YEAR = "YEAR"
MONTH = "MONTH"
Expand All @@ -25,11 +26,11 @@ def from_string(cls, transform_str):

def to_transform(self, raw_str):
if self in (
TransformType.YEAR,
TransformType.MONTH,
TransformType.DAY,
TransformType.HOUR,
TransformType.IDENTITY
TransformType.YEAR,
TransformType.MONTH,
TransformType.DAY,
TransformType.HOUR,
TransformType.IDENTITY
):
return {"type": self.value}

Expand All @@ -49,8 +50,12 @@ def to_transform(self, raw_str):

return {"type": TransformType.IDENTITY.value}


# https://docs.dremio.com/24.3.x/reference/api/reflections/
class ReflectionEntity:
def __init__(self, name, reflection_type, dataset_id, display_fields, dimensions, date_dimensions, measures, computations, partition_by, partition_transform, partition_method, distribute_by, localsort_by, arrow_cache):
def __init__(self, name, reflection_type, dataset_id, display_fields, dimensions, date_dimensions, measures,
computations, partition_by, partition_transform, partition_method, distribute_by, localsort_by,
arrow_cache):
self.__name = name
self.__type = reflection_type
self.__dataset_id = dataset_id
Expand Down

0 comments on commit 0c8a09b

Please sign in to comment.