Infer parquet schema to create table in SQL pool

Boris Tyukin 1 Reputation point
2020-07-15T14:03:33.717+00:00

hi,

I am evaluating Synapse analytics (in preview) and need to create tables in Synapse sql pool from parquet files, stored in ADLS gen2.

I would like to avoid creating tables manually in sql pool as my parquet files already have a schema with column names and data types.

SQL-on-demand does a great job by inferring parquet schema but I do not see how i can use this feature to create a table in Synapse as OPENROWSET command is only supported by SQL-on-demand.

I also tried new COPY INTO command but it does require me to create a target table upfront and provide DDL for all column names and data types (which is exactly what I am trying to avoid).

What is the best way to infer parquet schema from ADLS files and to create a table in sql pool without defining table upfront?

Thanks!

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,402 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,381 Reputation points Microsoft Employee
    2020-07-17T01:10:55.577+00:00

    Hello @Boris Tyukin ,

    Thanks for the question and using the forum .

    At this time the copy command does not have a feature to auto create the the table , internal team is working on that and it should be out in near future .

    I suggest you to use the and create a pipeline , in the pipeline we do have an option of "Auto create table" and it should help you .

    12762-1.gif

    Thanks & stay safe
    Himanshu
    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    1 person found this answer helpful.
    0 comments No comments