Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views3 pages

Adf Project

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)
13 views3 pages

Adf Project

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/ 3

create table cntrl_tbl

(
table_name varchar(20)
,source_name varchar(20)
,table_type varchar(20)
,incremental_col varchar(100)
,ingestion_dt varchar(20)
)

insert into dbo.cntrl_tbl


values('reviews','BazaarVoice','Incremental_append','created_dt','2023-09-22');

insert into dbo.cntrl_tbl


values('products','BazaarVoice','incremental_merge','lastmodified_dt','2023-09-22'
);

insert into dbo.cntrl_tbl values('categories','BazaarVoice','fullsync','','2023-09-


22');

Create table reviews


(
review_id varchar(10),
review_text varchar(1000),
prod_id varchar(10),
created_dt varchar(20),
Ishelpful varchar(10)
)

insert into reviews values('REVW001','product is not good','PROD001','2023-09-


22','yes');
insert into reviews values('REVW002','Nice product','PROD002','2023-09-22','yes');
insert into reviews values('REVW003','worthable product','PROD003','2023-09-
22','no');
insert into reviews values('REVW004','use less product','PROD004','2023-09-
22','no');
insert into reviews values('REVW005','product is not good','PROD005','2023-09-
22','yes');
insert into reviews values('REVW006','Nice product','PROD001','2023-09-22','yes');

insert into reviews values('REVW007','worthable product','PROD002','2023-09-


23','no');
insert into reviews values('REVW008','use less product','PROD003','2023-09-
23','no');
insert into reviews values('REVW009','product is not good','PROD004','2023-09-
23','yes');
insert into reviews values('REVW010','Nice product','PROD005','2023-09-23','yes');
insert into reviews values('REVW011','worthable product','PROD001','2023-09-
23','no');

insert into reviews values('REVW012','use less product','PROD002','2023-09-


24','yes');
insert into reviews values('REVW013','product is not good','PROD003','2023-09-
24','yes');
insert into reviews values('REVW014','Nice product','PROD004','2023-09-24','yes');
insert into reviews values('REVW015','product is not good','PROD001','2023-09-
24','yes');
insert into reviews values('REVW016','Nice product','PROD002','2023-09-24','no');
insert into reviews values('REVW017','worthable product','PROD003','2023-09-
24','no');

{
"count": 1,
"value": [
{
"table_name": "reviews",
"source_name": "BazaarVoice",
"table_type": "Incremental_append",
"incremental_col": "created_dt",
"ingestion_dt": "2023-09-22"
},

{
"table_name": "products",
"source_name": "BazaarVoice",
"table_type": "Incremental_append",
"incremental_col": "created_dt",
"ingestion_dt": "2023-09-22"
},

],
"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (East US)",
"billingReference": {
"activityType": "PipelineActivity",
"billableDuration": [
{
"meterType": "AzureIR",
"duration": 0.016666666666666666,
"unit": "Hours"
}
],
"totalBillableDuration": [
{
"meterType": "AzureIR",
"duration": 0.016666666666666666,
"unit": "Hours"
}
]
},
"durationInQueue": {
"integrationRuntimeQueue": 0
}
}

create procedure updateingestiondt


@ingestiondt varchar(20),
@tablename varchar(20)
AS
BEGIN

update dbo.cntrl_tbl set ingestion_dt=convert(VARCHAR(10),DATEADD(day, 1,


convert(date, @ingestiondt))) where table_name =@tablename

END

You might also like