acryl-datahub 1.2.0.10rc6__py3-none-any.whl → 1.2.0.10rc8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of acryl-datahub might be problematic. Click here for more details.

@@ -98,11 +98,14 @@ class EntityClient:
98
98
  except KeyError as e:
99
99
  # Try to import cloud-specific entities if not found
100
100
  try:
101
- from acryl_datahub_cloud._sdk_extras.entities.assertion import Assertion
102
- from acryl_datahub_cloud._sdk_extras.entities.monitor import Monitor
101
+ from acryl_datahub_cloud.sdk.entities.assertion import Assertion
102
+ from acryl_datahub_cloud.sdk.entities.monitor import Monitor
103
+ from acryl_datahub_cloud.sdk.entities.subscription import Subscription
103
104
 
104
105
  if urn.entity_type == "assertion":
105
106
  EntityClass = Assertion
107
+ elif urn.entity_type == "subscription":
108
+ EntityClass = Subscription
106
109
  elif urn.entity_type == "monitor":
107
110
  EntityClass = Monitor
108
111
  else:
@@ -124,13 +127,17 @@ class EntityClient:
124
127
 
125
128
  # Type narrowing for cloud-specific entities
126
129
  if urn.entity_type == "assertion":
127
- from acryl_datahub_cloud._sdk_extras.entities.assertion import Assertion
130
+ from acryl_datahub_cloud.sdk.entities.assertion import Assertion
128
131
 
129
132
  assert isinstance(entity, Assertion)
130
133
  elif urn.entity_type == "monitor":
131
- from acryl_datahub_cloud._sdk_extras.entities.monitor import Monitor
134
+ from acryl_datahub_cloud.sdk.entities.monitor import Monitor
132
135
 
133
136
  assert isinstance(entity, Monitor)
137
+ elif urn.entity_type == "subscription":
138
+ from acryl_datahub_cloud.sdk.entities.subscription import Subscription
139
+
140
+ assert isinstance(entity, Subscription)
134
141
 
135
142
  return entity
136
143
 
@@ -52,6 +52,7 @@ class ParserState(Enum):
52
52
  STRING = 2
53
53
  COMMENT = 3
54
54
  MULTILINE_COMMENT = 4
55
+ BRACKETED_IDENTIFIER = 5
55
56
 
56
57
 
57
58
  class _StatementSplitter:
@@ -141,6 +142,10 @@ class _StatementSplitter:
141
142
  self.state = ParserState.STRING
142
143
  self.current_statement.append(c)
143
144
  prev_real_char = c
145
+ elif c == "[":
146
+ self.state = ParserState.BRACKETED_IDENTIFIER
147
+ self.current_statement.append(c)
148
+ prev_real_char = c
144
149
  elif c == "-" and next_char == "-":
145
150
  self.state = ParserState.COMMENT
146
151
  self.current_statement.append(c)
@@ -172,6 +177,14 @@ class _StatementSplitter:
172
177
  elif c == "'":
173
178
  self.state = ParserState.NORMAL
174
179
 
180
+ elif self.state == ParserState.BRACKETED_IDENTIFIER:
181
+ self.current_statement.append(c)
182
+ if c == "]" and next_char == "]":
183
+ self.current_statement.append(next_char)
184
+ self.i += 1
185
+ elif c == "]":
186
+ self.state = ParserState.NORMAL
187
+
175
188
  elif self.state == ParserState.COMMENT:
176
189
  self.current_statement.append(c)
177
190
  if c == "\n":