File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
spark/ingestion/src/main/scala/feast/ingestion/stores Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ class BigTableSinkRelation(
154154
155155 private def tableName : String = {
156156 val entities = config.entityColumns.mkString(" __" )
157- s " ${config.projectName}__ ${entities}"
157+ s " ${config.projectName}__ ${entities}" .take(maxTableNameLength)
158158 }
159159
160160 private def joinEntityKey : UserDefinedFunction = udf { r : Row =>
@@ -164,6 +164,7 @@ class BigTableSinkRelation(
164164 private val metadataColumnFamily = " metadata"
165165 private val schemaKeyPrefix = " schema#"
166166 private val emptyQualifier = " "
167+ private val maxTableNameLength = 50
167168
168169 private def isSystemColumn (name : String ) =
169170 (config.entityColumns ++ Seq (config.timestampColumn)).contains(name)
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class CassandraSinkRelation(
6565
6666 def sanitizedForCassandra (expr : String ): String = {
6767 expr.replace('-' , '_' )
68+ expr.take(maxTableNameLength)
6869 }
6970
7071 val tableName = {
@@ -84,6 +85,8 @@ class CassandraSinkRelation(
8485
8586 val schemaTableName = s " ${sparkCatalog}. ${keyspace}.feast_schema_reference "
8687
88+ val maxTableNameLength = 48
89+
8790 def createTable (): Unit = {
8891
8992 sqlContext.sql(s """
You can’t perform that action at this time.
0 commit comments