madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmcquillan99 <...@git.apache.org>
Subject [GitHub] madlib issue #234: Create lower case column name in encode_categorical_varia...
Date Tue, 20 Feb 2018 19:03:52 GMT
Github user fmcquillan99 commented on the issue:

    https://github.com/apache/madlib/pull/234
  
    was just testing 1.13 on postgres 9.6 and found this error
    
    ```
    DROP TABLE IF EXISTS abalone_out, abalone_out_dictionary;
    SELECT madlib.encode_categorical_variables (
            'abalone',                   -- Source table
            'abalone_out',               -- Output table
            'height>.10'               -- Categorical columns
            );
    ```
    produces
    ```
    Done.
    (psycopg2.ProgrammingError) spiexceptions.SyntaxError: syntax error at or near "="
    LINE 5:                     (CASE WHEN (height>.10 = 'False') THEN 1...
                                                       ^
    QUERY:  
                CREATE TABLE abalone_out AS (
                    SELECT
                        id, sex, length, diameter, height, rings,
                        (CASE WHEN (height>.10 = 'False') THEN 1 ELSE 0 END)::INTEGER AS
"height>.10_False",(CASE WHEN (height>.10 = 'True') THEN 1 ELSE 0 END)::INTEGER AS "height>.10_True"
                    FROM
                        abalone
                    )
                
                
    CONTEXT:  Traceback (most recent call last):
      PL/Python function "encode_categorical_variables", line 23, in <module>
        return encode_categorical.encode_categorical_variables(**globals())
      PL/Python function "encode_categorical_variables", line 598, in encode_categorical_variables
      PL/Python function "encode_categorical_variables", line 147, in build_output_table
    PL/Python function "encode_categorical_variables"
     [SQL: "SELECT madlib.encode_categorical_variables (\n        'abalone',             
     -- Source table\n        'abalone_out',               -- Output table\n        'height>.10'
              -- Categorical columns\n        );"]
    ```



---

Mime
View raw message