TresAmigosSD / SMV

Spark Modularized View
Apache License 2.0
42 stars 22 forks source link

The class FooHiveTableWithQuery is not working as expected #1620

Open BlacShadou opened 4 years ago

BlacShadou commented 4 years ago

The class FooHiveTableWithQuery used to override the default hive table query is not working as expected. It is returning the default "select * from Schema.tablename" results.

Python version 2.7.15 Spark version 2.4.0.cloudera2 Smv version SMV-2.12

class HiveEmpTable1(smv.SmvHiveTable): def tableName(self): return "ampleschema.emptable" def tableQuery(self): return "SELECT employee_name FROM " + self.tableName() +" where employee_name = 'JOHN' "

Due to this issue I am currently using the following hack which return the filtered result class HiveEmpTable1(smv.SmvHiveTable): def tableName(self): return "sampleschema.emptable where employee_name = 'JOHN' "