Giter VIP home page Giter VIP logo

Comments (14)

Rahul-Gajula avatar Rahul-Gajula commented on July 17, 2024 1

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.

image

Thank you for your kind help. you may close the ticket.

from dbt-synapse.

dataders avatar dataders commented on July 17, 2024

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.

Rahul-Gajula avatar Rahul-Gajula commented on July 17, 2024

Hi swanderz , could not reply you immediately.
I am using a dedicated SQL pool. No luck with table creation.
image

from dbt-synapse.

dataders avatar dataders commented on July 17, 2024

weird! here's some questions:

  1. what version of dbt-synapse are you using?
  2. are you using seeds or sources for these transformations?
  3. what is the column type of device_id?
  4. can you share the info from the latest run in the log (logs/dbt.log)?

from dbt-synapse.

Rahul-Gajula avatar Rahul-Gajula commented on July 17, 2024
    • sqlserver: 0.20.1
    • synapse: 0.20.0
  1. Sources yes
    image

image
image
image
image

  1. dbt.log

from dbt-synapse.

alieus avatar alieus commented on July 17, 2024

Thanks @Rahul-Gajula. I’ll try to repro this error and see what I find

from dbt-synapse.

dataders avatar dataders commented on July 17, 2024

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.

alieus avatar alieus commented on July 17, 2024

@swanderz you're absolutely right. Running this directly in Synapse validates that you cannot have nvarchar(max) as a datatype:
image

However, the below works with no errors:
image

from dbt-synapse.

Rahul-Gajula avatar Rahul-Gajula commented on July 17, 2024

Hi alieus and swanderz,

Tried creating table as per the comments. Failed yet again.

image

dbt.log

It's not even recognizing the Create Syntax

from dbt-synapse.

alieus avatar alieus commented on July 17, 2024

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.

Rahul-Gajula avatar Rahul-Gajula commented on July 17, 2024

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.

alieus avatar alieus commented on July 17, 2024

where n is the size of the string in byte-pairs. For example, nvarchar(16).

from dbt-synapse.

Rahul-Gajula avatar Rahul-Gajula commented on July 17, 2024

Hi alieus,

Even that i tried. refer to the screen shot.
image

from dbt-synapse.

dataders avatar dataders commented on July 17, 2024

Glad to hear it! I’m sure this issue will definitely help someone else in the future.

from dbt-synapse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.