memsql / dbt-singlestore

Apache License 2.0
7 stars 8 forks source link

Check for shard key or sort key before creating the temporary command #24

Closed jvelezmagic closed 2 months ago

jvelezmagic commented 6 months ago

Summary: This PR addresses a compatibility issue in Singlestore for incremental models using shard_key or sort_key. Previously, attempting to use these keys would fail due to an incorrect assumption that temporary tables are rowstore, which is not supported by Singlestore for CLUSTERED COLUMNAR indexes.

Details:

okramarenko commented 5 months ago

Hi @jvelezmagic! Thank you for bringing this to our attention. In SingleStore, the SORT KEY()is not allowed when using CREATE ROWSTORE TABLE. However, there is no such restriction for shard keys. Therefore, I suggest retaining only the sort key check in the if-statement. If you encounter any issues with shard keys, could you please share the version of the adapter you're using and a model that triggers the problem?

okramarenko commented 2 months ago

added sort key check in #28