Skip to content

Instantly share code, notes, and snippets.

@datahai
Created July 29, 2021 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save datahai/b369f74d6c664ae7f6e74b02fad6c17f to your computer and use it in GitHub Desktop.
Save datahai/b369f74d6c664ae7f6e74b02fad6c17f to your computer and use it in GitHub Desktop.
New Fact Sales View
DROP VIEW LDW.vwFactSales;
GO
CREATE VIEW LDW.vwFactSales
AS
SELECT *,
CAST(fct.filepath(3) AS DATE) AS SalesOrderPathDate
FROM
OPENROWSET
(
BULK 'conformed/facts/factsales/*/*/*/*.parquet',
DATA_SOURCE = 'ExternalDataSourceDataLake',
FORMAT = 'Parquet'
) AS fct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment