Posts

Showing posts with the label Python

Step by step: Connecting Azure Cosmos Db to Azure Dynapse Analytics

Image
  Wassup Guyz? Today will talk about Linking Azure Cosmos DB to Azure Synapse Analytics, and then dealing with its migrated data.  As we all know, Azure Cosmos Db had been in the market for quiet a time now. Azure Cosmos DB is a globally distributed, multi-model database service offered by Microsoft. It is designed to provide high availability, scalability, and low-latency access to data for modern applications. It is a fully managed NoSQL and relational database for modern app development, whereby you can store the humongous volume of dataset, allowing them to be easily replicated across regions/locations, in a most effective way. Essentially in a Cosmos DB, we create a Database (we call it a TodoList) and inside it the we keep Tables (called as Items), into which we can keep our records. And as you have rightly guessed, the reccords are stored in form of JSON structures, and you have provision to query the records and even create triggers/stored procs on them. Creating...

Using Python to plot D365FO data and visualize the trend, by using dataframes

Image
  I am sure you must have read my earlier post: https://subsd365.blogspot.com/2024/03/using-python-to-fetch-data-from-d365.html, which outlines a way of reading the data from D365FO, using Python. This post will help you just not fetching the data from F&O, but also visualise the data plot against x and y axes and then understanding the trend of your business (eg: you can see which Item is a high demand item, which customer has made the maximum transactions across a given time frame -- even when could a customer potentially could transact again: examples galore). And uh, ok -- before you proceed you have read the above post first and make sure: a. You have installed Jupyter notebook on your machine (it's free and absolutely easy to install and operate). b. You have a valid Microsoft Entra Id configured and given API permission to D365F&O. c. You have listed the client Id in your D365F&O side Entra Id registration. Before we begin, let us  quickly  check: ...

Using Python to fetch data from D365 Finance & operations

Image
  This short article can help you fetch data from D365FinOps, which a. You can subsequently analyse b. You can perfrom further predictive modelling based on this data  c. Understanding and forcasting the direction in which business is going and so on. And it's quite straight forward. Step 1. Define your Azure app registrations (AKA Microsoft Entra-ID). Step 2. Enasure that the Azure App is registered in D365FO end by enabling the same through System Admin \\Setup\\ Microsoft Entra ID Applications   Step 3. We are going to use Jupyter Notebook here, for our code. This could be easily launched, if you have installed Anaconda as your IDE and then simply going to Windows \\ Jupyter. This will prompt you with an intermittent DOS prompt like this: And will eventually open the Jupyter browser which looks lot like this: Step 4: We are going to use the following modules for our code: import requests import json   The former handles the requests and responses from API calls ...

An example of predictive modelling using Decision trees, Python - step by step

Image
.  The aim is to how accurately your system can predict the future. All around the globe, we are seeing organizations and enterprises are preparing applications that can read, and understand the psyche of the buyers and thereby predicting what they could come up to buy in another 3-4 months. This is exactly how you see 'Customers who have brought this, have also brought that' on Amazon or 'People similar to your profile' on LinkedIn. The idea is to feed your system with more and more data. As you pour in more data to train your machine, easier it gets for the machine to understand the pattern. And more accurate is the result. A typical machine learning process consists of the following steps: Import the data: This is where we feed the data into the system. Clean the data: the most essential part of the process that demands to clean the data beforehand to get rid of duplicate data, repetitive data, data with null values, etc. Each project has a different modus operandi ...

Creating a chatbot program that can learn as you interact

Image
   ¡Hola!  As we delve deeper into AI and machine learning saga, here is a very cool Python code that could help you create a small Chatbot program, that can  a. Learn from you as you chat with it b. Save information, so that when you reopen the program it can remember what it has learned for so long. c. And it should be pretty fast to respond. The below code is very basic and could be exercised to include more and more features as you go through it.  And I used Python as my code; alternatively, you can also write the same using C#, if that's what you are comfortable with. The algorithm: I am creating a file called: questionBank.json and saving it as a physical file, and which starts with a couple of very basic questions: I am chatting with my chatbot like this: And when I ask it something it doesn't know: So that when you ask it next time: Pretty cool, eh? Let me show you, how this has been done. Step 1: I am using Spyder3.11, as my IDE, but alternatively you ...

Using Maps(aka dictionaries) while interacting Python with X++

Image
  We all know the excellent capabilities of using a dictionary in Python.  A dictionary could be an indexed pair of key-value combinations, where we can have keys that necessarily not be a value that needs to start from zero.  Ex: assigning/defining a dictionary like this: custBal = {"CU0001": 250000.00, "CU0002": 65123.11, "CU0003": 43200.11, "CU0004": 10000.00} It contains customer balances. And thereby I can access the values like:  print(custBal["CU0002"]) We can also loop through the elements by: for x in custBal:     print (x) The compiler will give you Keys' values: Or I can access the values of the keys, by simply: print (custBal.values()) Which would result in: Also, I can add/remove/manipulate elements by simple operations like: del (custBal["CU0002"]) Now to the main point. Why so much ado about dictionary` data-types on Python? Answer is simple. They behave exactly as a map datatype of x++. We can, in essence, ...