64967180

Date: 2020-11-23 11:08:30
Score: 6.5
Natty:
Report link

I have a similar problem. getting the error message: NULL result in a non-nullable column on my loading my parquet files.

I have NOT null columns in Snowflake for example, NAME2, NAME3, but the values against them in the parquet files are empty string.

So my question is how can I resolve this constraint without changing my table definition or without removing not null constraint?

COPY INTO "DB_STAGE"."SCH_ABC_INIT"."T_TAB" FROM (
SELECT
$1:OPSYS::VARCHAR,
$1:MANDT::VARCHAR,
$1:LIFNR::VARCHAR,
$1:LAND1::VARCHAR,
$1:NAME1::VARCHAR,
$1:NAME2::VARCHAR,
$1:NAME3::VARCHAR,
$1:NAME4::VARCHAR,
..
..
$1:OPTYPE::VARCHAR
FROM @DB_STAGE.SCH_ABC_INIT.initial_load_stage_ABC)
file_format = (type = 'parquet', NULL_IF=('NULL','',' ','NULL','NULL','//N'))
pattern = '.*/ABC-TAB-prod/.*snappy.parquet';
Reasons:
  • Blacklisted phrase (1.5): how can I
  • Blacklisted phrase (1): I have a similar problem
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2): I have a similar problem
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: user6734184