CREATE fact TABLE tfidf_output1 DISTRIBUTE BY HASH(term) AS SELECT * FROM tf_idf ( ON TF ( ON tfidf_input1 PARTITION BY docid ) AS tf PARTITION BY term ON (SELECT COUNT (DISTINCT docid) FROM tfidf_input1 ) AS doccount DIMENSION );
CREATE fact TABLE tfidf_output1 DISTRIBUTE BY HASH(term) AS SELECT * FROM tf_idf ( ON TF ( ON tfidf_input1 PARTITION BY docid ) AS tf PARTITION BY term ON (SELECT COUNT (DISTINCT docid) FROM tfidf_input1 ) AS doccount DIMENSION );