Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.8 KB

File metadata and controls

43 lines (28 loc) · 1.8 KB

Create a Linked Service

Practice creating a linked service. In this case we'll connect to my sample datasets storage account to leverage that data in later labs.

  • Under Linked choose Connect to External data

  • Azure Blob Storage

  • call it davesdemoblobs or equivalent

  • SAS URL: https://davewdemoblobs.blob.core.windows.net

  • SAS token: ?sv=2019-12-12&ss=btqf&srt=sco&st=2018-02-23T17%3A18%3A00Z&se=2032-05-24T16%3A18%3A00Z&sp=rl&sig=5GnpyfFM%2F5Es1p9uXq%2B7Fo3ZObO530AoVnjNlpS7%2FAw%3D

https://davewdemoblobs.blob.core.windows.net/nyctaxi-staging?sv=2020-04-08&st=2021-06-14T17%3A12%3A00Z&se=2031-06-16T17%3A12%3A00Z&sr=c&sp=rl&sig=jOJsi5E5CgxU1L0LYl02xxgrAgPLMkRnWXAizertyUY%3D

https://davewdemodata.blob.core.windows.net/lake?sv=2020-04-08&st=2021-06-14T17%3A14%3A00Z&se=2030-06-16T17%3A14%3A00Z&sr=c&sp=rl&sig=9u7gONEHnqybJTReLN%2F5PYEO6JOY2oTKm2rRhmZuahk%3D

Note: the SAS above is pointed to the root storage account.

You are probably expecting to see the linked service listed in your workspace. But it won't be. For security, the Synapse service needs access to the SAS token via a role assignment. Let's do that:

  • Go to Manage|Linked Services and find davesdemoblobs then view role assignments

TODO

USE sandbox
GO
create master key encryption by password = 'Password01!!';
GO

CREATE DATABASE SCOPED CREDENTIAL [cred-readonlydemoblobs]
WITH IDENTITY='SHARED ACCESS SIGNATURE',  
SECRET = 'sv=2019-12-12&ss=btqf&srt=sco&st=2020-12-16T17%3A01%3A00Z&se=2034-12-18T17%3A01%3A00Z&sp=rl&sig=mbTmp9ajAH0z3WUjJsaWwE6jF1%2BKPF56uStoT18R5AU%3D'
GO

CREATE EXTERNAL DATA SOURCE readonlydemoblobs WITH (
    LOCATION = 'https://davewdemoblobs.blob.core.windows.net/nyctaxidata',
    CREDENTIAL = [cred-readonlydemoblobs]
);

yellow_tripdata_2019-01.csv