question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CreateError when attempting to create a table

See original GitHub issue

I’m getting an error when trying to create a table. This is the code:

from ksql import KSQLAPI
client = KSQLAPI('http://localhost:8088')
client.create_table(table_name='mytable',
                    columns_type=['viewtime bigint', 'userid varchar', 'pageid varchar'],
                    topic='mytopic',
                    value_format='JSON')

and the error:

Traceback (most recent call last):
  File "/home/lrussell/Dev/ksql-plotly-dash/basic.py", line 6, in <module>
    value_format='JSON')
  File "/home/lrussell/.virtualenvs/ksql-plotly-dash/lib/python3.6/site-packages/ksql/client.py", line 50, in create_table
    value_format = value_format)
  File "/home/lrussell/.virtualenvs/ksql-plotly-dash/lib/python3.6/site-packages/ksql/api.py", line 142, in create_table
    value_format=value_format)
  File "/home/lrussell/.virtualenvs/ksql-plotly-dash/lib/python3.6/site-packages/ksql/api.py", line 164, in _create
    return self._parse_ksql_res(r, CreateError)
  File "/home/lrussell/.virtualenvs/ksql-plotly-dash/lib/python3.6/site-packages/ksql/api.py", line 40, in _parse_ksql_res
    raise CreateError(r)
ksql.errors.CreateError: Cannot define a TABLE without providing the KEY column name in the WITH clause.

I think the error might be related to this line. Maybe it needs an extra value in the WITH clause for the key? The key isn’t listed as a required property for creating tables according to the KSQL documentation, but possibly something has changed recently.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lucrussellcommented, Aug 6, 2018

thanks! 👍

1reaction
davit555commented, Aug 6, 2018

thanks for the fix 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLITE TABLE Create error - Stack Overflow
It sounds like the table already exists, possibly from a previous run of your script. The quickest way to test this would be...
Read more >
15.10 - CREATE ERROR TABLE - Teradata Database
Purpose Defines the name and containing database of a new error table and specifies the name of the associated data table. If the...
Read more >
286, SQLSTATE=42727, SQLERRMC=8192 - IBM
InfoSphere Information Server installation fails due to table create error SQLCODE=-286, SQLSTATE=42727, SQLERRMC=8192. Troubleshooting. Problem.
Read more >
FIX: "Failed to create a new table" error when you export the ...
Describes an issue that generates a "Failed to create a new table" error when you export the cleansing results of a Data Quality...
Read more >
Impala External Table Create Error - Cloudera Community
When I try to create my external table from the impala-shell it gives me the following error: ERROR: MetaException: Got exception: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found