Databricks commands: Import library requests to be able to run HTTP requests. Define the parameters, the Basic Authentication attributes (username, password) and execute GET request. spark.conf.set() define the access key for the connection to Data Lake. The access key can be found in Azure Portal. Define the destination folder path […]
Create database: Databricks commands: The values for hostname, port, database and username can be found in the connection string of the database. As many as needed parameters can be declared and used in a dynamic SQL query. The result is stored in data frame (df). The content can be shown […]
Keep it simple :-)
Running total in groups: Running text replace in groups: Get the result: Keep it simple :-)
I googled “mariadb pivot” and the first answer was this. I need to generate this code: In few words PIVOT is grouping by two groups: CustomerID, ItemID Period And the result is: I played a little and i got this: The result is: The same code for SQL Server: It […]
I met a code that CONVERT(BIT, Value) and insert into BIT column. Let’s see what are the possible values.
I needed to quote an identifier (a column name) with “<“. I checked the documentation for the build-in function QUOTENAME() and I did not find the information that I need. Here is a quick T-SQL to show which characters we can use as a second argument of the function.
SSISDB is the database that is collaborating with SSIS. When we execute a package, the execution information is logged in SSISDB. If a job is scheduled, we need to know if there are errors in the executions. As a last step in SSIS package, I run stored procedure that searches […]