dbt-cube-sync 0.1.0a1__tar.gz → 0.1.0a3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dbt-cube-sync
3
- Version: 0.1.0a1
3
+ Version: 0.1.0a3
4
4
  Summary: Synchronization tool for dbt models to Cube.js schemas and BI tools
5
5
  Author: Ponder
6
6
  Requires-Python: >=3.9,<4.0
@@ -191,19 +191,7 @@ class SupersetConnector(BaseConnector):
191
191
 
192
192
  cube_name = cube_name_match.group(1)
193
193
 
194
- # Extract schema and table name from SQL query
195
- sql_match = re.search(r'sql:\s*[`"\']\s*SELECT\s+.*FROM\s+(\w+\.\w+)', content, re.IGNORECASE)
196
- if sql_match:
197
- schema_table = sql_match.group(1)
198
- schema_name, table_name = schema_table.split('.')
199
- else:
200
- # Fallback to cube name
201
- schema_name = "public"
202
- table_name = cube_name
203
-
204
194
  print(f" Cube: {cube_name}")
205
- print(f" Schema: {schema_name}")
206
- print(f" Table: {table_name}")
207
195
 
208
196
  # Parse dimensions
209
197
  dimensions = self._parse_dimensions(content)
@@ -213,8 +201,8 @@ class SupersetConnector(BaseConnector):
213
201
 
214
202
  return {
215
203
  'cube_name': cube_name,
216
- 'schema': schema_name,
217
- 'table_name': table_name,
204
+ 'schema': 'public', # Always use public schema for Cube.js
205
+ 'table_name': cube_name, # Use cube name as table name (e.g., CoursePerformanceSummary)
218
206
  'dimensions': dimensions,
219
207
  'measures': measures
220
208
  }
@@ -408,10 +396,11 @@ class SupersetConnector(BaseConnector):
408
396
  """Create a new dataset in Superset"""
409
397
  dataset_url = f"{self.base_url}/api/v1/dataset/"
410
398
 
399
+ # Create a simple table dataset (Cube.js will handle the actual data source)
411
400
  payload = {
412
401
  "database": self.database_id,
413
- "schema": schema_info['schema'],
414
- "table_name": schema_info['table_name'],
402
+ "schema": schema_info['schema'], # "public"
403
+ "table_name": schema_info['table_name'], # cube name like "CoursePerformanceSummary"
415
404
  "normalize_columns": False,
416
405
  "always_filter_main_dttm": False
417
406
  }
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dbt-cube-sync"
3
- version = "0.1.0a1"
3
+ version = "0.1.0a3"
4
4
  description = "Synchronization tool for dbt models to Cube.js schemas and BI tools"
5
5
  authors = ["Ponder"]
6
6
  readme = "README.md"