0% found this document useful (0 votes)
1 views

SQL Script for Dedicated SQL Pool1

The document outlines a SQL script that checks for the existence of a table named 'NYCTaxiTripSmall' in the 'dbo' schema and creates it if it does not exist. The table is defined with various columns related to taxi trip data, including pickup and dropoff details, fare amounts, and trip duration. Additionally, it includes a command to copy data from a specified Parquet file into the newly created table.

Uploaded by

Reddy1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

SQL Script for Dedicated SQL Pool1

The document outlines a SQL script that checks for the existence of a table named 'NYCTaxiTripSmall' in the 'dbo' schema and creates it if it does not exist. The table is defined with various columns related to taxi trip data, including pickup and dropoff details, fare amounts, and trip duration. Additionally, it includes a command to copy data from a specified Parquet file into the newly created table.

Uploaded by

Reddy1993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

IF NOT EXISTS (SELECT * FROM sys.objects O JOIN sys.schemas S ON O.

schema_id =
S.schema_id WHERE O.NAME = 'NYCTaxiTripSmall' AND O.TYPE = 'U' AND S.NAME = 'dbo')
CREATE TABLE dbo.NYCTaxiTripSmall
(
[DateID] int,
[MedallionID] int,
[HackneyLicenseID] int,
[PickupTimeID] int,
[DropoffTimeID] int,
[PickupGeographyID] int,
[DropoffGeographyID] int,
[PickupLatitude] float,
[PickupLongitude] float,
[PickupLatLong] nvarchar(4000),
[DropoffLatitude] float,
[DropoffLongitude] float,
[DropoffLatLong] nvarchar(4000),
[PassengerCount] int,
[TripDurationSeconds] int,
[TripDistanceMiles] float,
[PaymentType] nvarchar(4000),
[FareAmount] numeric(19,4),
[SurchargeAmount] numeric(19,4),
[TaxAmount] numeric(19,4),
[TipAmount] numeric(19,4),
[TollsAmount] numeric(19,4),
[TotalAmount] numeric(19,4)
)
WITH
(
DISTRIBUTION = ROUND_ROBIN,
CLUSTERED COLUMNSTORE INDEX
-- HEAP
)
GO
COPY INTO dbo.NYCTaxiTripSmall
FROM 'https://1458wasaysa.dfs.core.windows.net/srccon/NYCTripSmall.parquet'
WITH
(
FILE_TYPE = 'PARQUET'
,MAXERRORS = 0
,IDENTITY_INSERT = 'OFF'
)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy