File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
spark/ingestion/src/main/scala/feast/ingestion/stores Expand file tree Collapse file tree 2 files changed +5
-2
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 @@ -64,7 +64,7 @@ class CassandraSinkRelation(
6464 }
6565
6666 def sanitizedForCassandra (expr : String ): String = {
67- expr.replace('-' , '_' )
67+ expr.replace('-' , '_' ).take(maxTableNameLength)
6868 }
6969
7070 val tableName = {
@@ -84,6 +84,8 @@ class CassandraSinkRelation(
8484
8585 val schemaTableName = s " ${sparkCatalog}. ${keyspace}.feast_schema_reference "
8686
87+ val maxTableNameLength = 48
88+
8789 def createTable (): Unit = {
8890
8991 sqlContext.sql(s """
You can’t perform that action at this time.
0 commit comments