Skip to main content

Posts

Showing posts from June, 2024

Working with Json File Format In Python

 json Format File: json is java script object notation file format, which is very popular and efficient in storing API calls dataset, or web scrapping dataset, saving configuration details as an intermediate file etc. It is widely acceptable across all environments. Working with json format data through Python: SAMPLE DATASET: var = ' [{'data':{'employee':{'name':'xyz','age':25,'gender':'M','address':''}}]' here we can observe the 'var' stores a string which contain a string, if we see string have a dictionary stored in it, which has 'data' as key and value again contains another dictionary have 'name', 'age', 'gender' and 'address' as keys. Here we will try to work with json data: 1) fetch JSON data: import json var = '''[{"data":{"employee":{"name":"xyz","age":25,"gender":"M",...

SQL SERVER STORED PROCEDURE

 What is a Stored Procedure? So, basically stored procedure or SP is a permanent database object, used to meet business requirement like loading and creation of table, validating source dataset, profiling and gathering data statistics, performing auditing, cataloging any server level information etc. To Understand more about stored procedure, lets say, for a business requirement source dataset need to be profiled and statistics need to be found in order to get information about the source data:- CREATE PROC PROC_NAME ( ) AS BEGIN      BEGIN TRY SELECT  COUNT(*) AS TOTAL_ROWS, MAX(COL1) AS MAXIMUM VALUE INTO #TEMP1 FROM      END TRY     BEGIN CATCH     END CATCH END