Comments (14)
Hi alieus and swanderz,
i figured out the solution for it. i need to change my data type to make it work. Using convert operator in the sql syntax worked.
Thank you for your kind help. you may close the ticket.
from dbt-synapse.
what type of Azure synapse dedicated pools are you using: dedicated or serverless? My guess is you're using a serverless pool which do not support tables. You may want to try dbt-msft/dbt-synapse-serverless instead. Though huge caveat that serverless pools aren't that great of a solution for synapse today.
from dbt-synapse.
Hi swanderz , could not reply you immediately.
I am using a dedicated SQL pool. No luck with table creation.
from dbt-synapse.
weird! here's some questions:
- what version of
dbt-synapse
are you using? - are you using seeds or sources for these transformations?
- what is the column type of
device_id
? - can you share the info from the latest run in the log (
logs/dbt.log
)?
from dbt-synapse.
from dbt-synapse.
Thanks @Rahul-Gajula. I’ll try to repro this error and see what I find
from dbt-synapse.
Looking at the error message I see:
Database error: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The statement failed. Column 'device_id' has a data type that cannot participate in a columnstore index.
Any chance you can change your column types to not use nvarchar(max)
? Not only will it not work with dbt-synapse, but it's not a good idea as it isn't very optimized.
from dbt-synapse.
@swanderz you're absolutely right. Running this directly in Synapse validates that you cannot have nvarchar(max) as a datatype:
However, the below works with no errors:
from dbt-synapse.
Hi alieus and swanderz,
Tried creating table as per the comments. Failed yet again.
It's not even recognizing the Create Syntax
from dbt-synapse.
Hey @Rahul-Gajula , if you’d like to test this, you’d have to run it directly in your synapse workspace.
What you need to do is change the datatypes in your source tables from nvarchar(max) to nvarchar(n) and then run your select queries again in dbt.
from dbt-synapse.
Hi alieus,
Even with the data type nvarchar(n) i am not able to create a table.
CREATE TABLE telemetry_test(
device_id NVARCHAR(n),
IP_adress NVARCHAR(n)
);
from dbt-synapse.
where n is the size of the string in byte-pairs. For example, nvarchar(16).
from dbt-synapse.
Hi alieus,
Even that i tried. refer to the screen shot.
from dbt-synapse.
Glad to hear it! I’m sure this issue will definitely help someone else in the future.
from dbt-synapse.
Related Issues (20)
- Error when using incremental models on Synapse REPLICATE table distribution HOT 4
- Incorrect syntax near 'column' error adding a New Column with on_schema_change='sync_all_columns' HOT 1
- Incorrect syntax near 'column' error renaming a Column with on_schema_change='sync_all_columns' HOT 1
- upgrade to support dbt-core v1.3.0 HOT 1
- sam, are you there?
- sam, are you there?
- Changing the distribution and index types in existing snapshots don't have any effect HOT 1
- upgrade to support dbt-core v1.4.0 HOT 2
- Stand up new CI-testing pool HOT 1
- upgrade to support dbt-core v1.5.0
- This repo is missing important files
- upgrade to support dbt-core v1.6.0
- Incremental table creation has unneccessary indexes, write temp table as a HEAP HOT 1
- Satellite problem when using case sensitive collations HOT 1
- upgrade to support dbt-core v1.7.0
- Unable to authenticate to a synapse intance with a dedicated pool HOT 7
- Version of adapter is not visible for `dbt --version` command HOT 2
- upgrade to support dbt-core v1.8.0
- `get_limit_subquery()` does not work with queries containing CTEs HOT 1
- Synapse sql login not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt-synapse.