fix(connectors): small fix of varchar size (#1403)
This commit is contained in:
parent
a2968e8cc5
commit
440ebca03b
1 changed files with 8 additions and 2 deletions
|
|
@ -215,11 +215,17 @@ def get_df_from_batch(batch, level):
|
||||||
try:
|
try:
|
||||||
if df[x].dtype == "string" or current_types[x] == "string":
|
if df[x].dtype == "string" or current_types[x] == "string":
|
||||||
df[x] = df[x].fillna('NULL')
|
df[x] = df[x].fillna('NULL')
|
||||||
df[x] = df[x].str.slice(0, 8000)
|
if x == 'user_id' or x == 'user_anonymous_id':
|
||||||
|
df[x] = df[x].str.slice(0, 7999)
|
||||||
|
else:
|
||||||
|
df[x] = df[x].str.slice(0, 255)
|
||||||
df[x] = df[x].str.replace("|", "")
|
df[x] = df[x].str.replace("|", "")
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
print(repr(e))
|
print(repr(e))
|
||||||
if df[x].dtype == 'str':
|
if df[x].dtype == 'str':
|
||||||
df[x] = df[x].str.slice(0, 8000)
|
if x == 'user_id' or x == 'user_anonymous_id':
|
||||||
|
df[x] = df[x].str.slice(0, 7999)
|
||||||
|
else:
|
||||||
|
df[x] = df[x].str.slice(0, 255)
|
||||||
df[x] = df[x].str.replace("|", "")
|
df[x] = df[x].str.replace("|", "")
|
||||||
return df
|
return df
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue