Synapse Analytics and .NET for Apache Spark Example 3 – CTE() from Blog Posts – SQLServerCentral

The next example is how to do a CTE (Common Table Expression). When creating the … Read more Synapse Analytics and .NET for Apache Spark Example 3 – CTE() from Blog Posts – SQLServerCentral

The next example is how to do a CTE (Common Table Expression). When creating the CTE I will also rename one of the columns from “dataType” to “x”.

T-SQL WITH CTE(x, dataType, dataSubType) AS ( SELECT dateTime, dataType, dataSubType FROM chicago.safety_data ) SELECT * FROM CTE; Spark SQL WITH CTE AS (SELECT dateTime as x, dataType, dataSubType FROM chicago.safety_data) SELECT * FROM CTE DataFrame API (C#) The DataFrame example is a bit odd – by creating a data frame with the first query we have the CTE that we can use:

The post Synapse Analytics and .NET for Apache Spark Example 3 – CTE()[1] appeared first on SQLServerCentral[2].

References

  1. ^ Synapse Analytics and .NET for Apache Spark Example 3 – CTE() (www.sqlservercentral.com)
  2. ^ SQLServerCentral (www.sqlservercentral.com)


Source: Programming News



Leave a Reply

Your email address will not be published. Required fields are marked *