79699387

Date: 2025-07-12 15:28:59
Score: 2.5
Natty:
Report link

If you already know the schema, you could create the duckdb table with an explicit schema rather than having it inferred, or cast the columns on the select?

  CREATE  TABLE temp_data (); 
  INSERT INTO temp_data SELECT * FROM read_json_auto('${path}');


CREATE OR REPLACE TABLE temp_data AS
  SELECT cast(x as a), cast(y as b) FROM read_json_auto('${path}');
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: efromvt