File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp
spark/src/main/scala/ai/chronon/spark Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ class DelegatingBigQueryMetastoreCatalog extends CatalogExtension {
95
95
Try { icebergCatalog.loadTable(ident) }
96
96
.recover {
97
97
case _ => {
98
- val connectorTable = connectorCatalog.loadTable(ident)
99
98
val tId = ident.namespace().toList match {
100
99
case database :: Nil => TableId .of(database, ident.name())
101
100
case project :: database :: Nil => TableId .of(project, database, ident.name())
@@ -122,6 +121,7 @@ class DelegatingBigQueryMetastoreCatalog extends CatalogExtension {
122
121
Map (TableCatalog .PROP_EXTERNAL -> " true" , TableCatalog .PROP_LOCATION -> uri))
123
122
}
124
123
case _ : StandardTableDefinition => {
124
+ val connectorTable = connectorCatalog.loadTable(ident)
125
125
DelegatingTable (connectorTable, Map (TableCatalog .PROP_EXTERNAL -> " false" ))
126
126
}
127
127
case _ => throw new IllegalStateException (s " Cannot support table of type: ${table.getFriendlyName}" )
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ class TableUtils(@transient val sparkSession: SparkSession) extends Serializable
134
134
}
135
135
136
136
def loadTable (tableName : String ): DataFrame = {
137
- sparkSession.sql(s " select * from ${tableName}" )
137
+ sparkSession.sql(s " SELECT * FROM ${tableName}" )
138
138
// sparkSession.read.load(DataPointer.from(tableName, sparkSession))
139
139
}
140
140
@@ -741,16 +741,14 @@ class TableUtils(@transient val sparkSession: SparkSession) extends Serializable
741
741
rangeWheres : Seq [String ],
742
742
fallbackSelects : Option [Map [String , String ]] = None ): DataFrame = {
743
743
744
- val dp = DataPointer .from(table, sparkSession)
745
744
var df = sparkSession.sql(s " SELECT * FROM ${table}" )
745
+ // val dp = DataPointer.from(table, sparkSession)
746
746
// var df = sparkSession.read.load(dp)
747
747
748
748
val selects = QueryUtils .buildSelects(selectMap, fallbackSelects)
749
749
750
750
logger.info(s """ Scanning data:
751
- | table: ${dp.tableOrPath.green}
752
- | options: ${dp.readOptions}
753
- | format: ${dp.readFormat}
751
+ | table: ${table.green}
754
752
| selects:
755
753
| ${selects.mkString(" \n " ).green}
756
754
| wheres:
You can’t perform that action at this time.
0 commit comments