OData API not loading all the legal entities data from fields - microsoft-dynamics

I have customized the new data entity to show the data from dynamics 365 to load in Power BI desktop to create new power Bi reports.
Have created the data entity with ProjTable as master data source and added child data sources which I required to add fields.
Fields which are added to my data entity all are showing data except two fields project manager and sales manager.
Project and sales manager data is loading for my associated entity and not for all legal entities.
Please check the code and let me know if I'm missing anything here :
projTable = ProjTable::find(this.ProjId);
this.ProjectManager = Hcm:;find(projTable.Worker.responsible).name;
this.SalesManager = HcmWorker::find(projTable.WorkerResponsibleSales).name();

make sure your ProjTable::find(this.ProjId) has the below syntax for crosscompany it not replace it to this
select firstonly crosscompany projTable where projTable.ProjId == this.ProjId;
Refer to this document: crossCompany keyword

Related

Dynamic values for workspace, dataset and table when adding row to a Power BI data set

I am using the 'Add rows to a dataset' to Power BI connector which should point to different streaming datasets.
I would like to fill out the workspace, dataset and table values dynamically. Is this possible?
I've included an image of the connector I am working with. So far I have tried initializing a string variable with UUID's but that doesn't work.
EDIT: Added image of error when I try to add workspace as a dynamic value
I managed to get it to work so to make sure you're doing the right thing, you need to do something like the following.
First of all, create your string variable that store the workspace name, GUID of the DataSet and the name of the table ...
If you want to be sure of the names, etc. then do it using the dropdowns and then look at the code view to get the right values ...
Now to assign the variables, make sure you select the following option ...
... now you can select your variables.
If you're going to make the thing dynamic, you need to pass in a Body that has a serialized Payload. It looks different to the connector when you're using the dropdowns to select your workspace, dataset and table.
This is an example of the payload (must be an array) ...
[ { "DateTime": "2022-03-25T12:32:20.063Z", "Value": 120 } ]
... and as you can see from the below, the Body needs to have a single property called Payload and that will contain the serialized JSON.
When I do all of that, it works ...

Creating An external Table With Partitions in GCP

I am trying to creating an external table with Partition below is the reference image i am using.
Here is what i am intending to do :
I have files flowing into this folder:
I need to query the external table based on the date :
eg :
select * from where _PartitionDate ='';
My specific query is what should i fill in the GCS bucket & source Data partitioning fields.
Thank you.
According to the documentation that Guillaume provided [1], you should click on the Source data partitioning box and provide the following link there:
gs://datalake-confidential-redacted/ExternalTable_Data/
Also, the Table type should be External table.
Once that is fixed, you should be able to create the table. I have reproduced the issue on my own and it is working.
[1] -
https://cloud.google.com/bigquery/docs/hive-partitioned-queries-gcs#hive-partitioning-options
This part of the documentation should help you. You need to check the Source data partitioning and then to fill in your prefix URI such as
gs://datalake-confidential-redacted/ExternalTable_Data/{dt:DATE}
And then, use this dt field as any field in your queries
SELECT *
FROM `externale-table`
WHERE dt = "2020-01-10"
Custom Wizard has an issue with this approch. Once we used Teraform scripts it has been successful. It mandates a need to mark HIVE partition to custom & once the date column is created it is added as column into the table. there by allowing to query.

Where are Redmine default priority names stored

I have a read-only access to our Redmine DB (MySQL). This rights were given to me so I could build some reports.
And now I am facing a problem.
I got an issues table and there is a field named priority_id. How can I get priority names (like Normal,Urgent etc that represent each id)?
I searched DB/SO/google but couldn't found where this values are stored, only Priority Plug-in for Redmine.
Redmine stores the defined priorities as well as other similar data (like time entry activities or document categories) in a database table called enumerations. The defined enumerations can be shown with this example SQL:
SELECT name FROM enumerations WHERE type = 'IssuePriority' ORDER BY position ASC;
To associate the priority to issues, you can e.g. use
SELECT issues.id, issues.subject, enumerations.name FROM issues LEFT OUTER JOIN enumerations ON issues.priority_id = enumerations.id AND enumerations.type = 'IssuePriority'
On the Redmine web interface, you can edit the data in Administration -> Enumerations.

Sitecore Analytics tracking click events

In a project I am working on tracking click events is done by the following code:
var goal = new PageEventItem(goalItem);
var eventRow = Tracker.Current.Interaction.CurrentPage.Register(goal);
eventRow.DataKey = ID;
eventRow.Data = NAME;
eventRow.Text = DATA;
This will be recorded to the interactions table on MongoDB, What I need know is to create a report that display these registered data? so my question is how I can read these data from MongoDb?
Approach to build reports on data directly from MongoDB will not work well on big amount of records.
You should take a look in a direction how to aggregate your data in Reporting DB and build report using it.
If you really need to look at the live data in MongoDb you could try using a third party tool like SlamData - http://slamdata.com/get-slamdata/slamdata-for-mongodb/
This would also give you the ability to produce charts from your MongoDb data. However the data wouldn't be available from within the Sitecore shell.
If you can wait for the data to be aggregated then go with Antons suggestion below.

DB Structure for a shopping cart

I like to develop a shopping cart website with multiple products.
(ex.: mobile phone, furniture etc.,)
here mobile phone specification will cover
size of display
memory
operating system
camera etc.,
but for furniture - its specification is entirely different from above electronic product.
type of wood
color
weight
shape
glass or mat finish etc.,
My question is: how to handle a common database-table for product specification ?
each & every category of product & its spec will be differ - so how to have a common
table ProductSpecificationTable ?
I searched many site including google.. but cant able to get the perfect soultion.
Please help me to move to next step.
Ask yourself the question: How can I accomplish this kind of database? First of all you need products.. Every product has to be in some kind of category and every category has to have his own properties. So, you've to create a product table with unique id and every product needs a category id. At this moment it is time to link from your property table to your category table(by id) and to set the values you need a 'property_value' table.
**table:** **id**
product --> category id
property --> category_id
property_value --> property_id
I hope you will understand my explanation otherwise just ask :)
You can add 1 more table to accomplish that. Table that contains cat_id, product_id and the property. That is a many to many relationship. I believe this way you can accomplish thst.
You can achieve this with a single table within a database but that will complicate the CRUD operations over the table. So I will recommend you to create one database like ‘Inventory’ which can have multiple tables (one table for each of the Product Type).
First Table could be list of Product Types you have (mobile phones, accessories, furniture):
You can use this table to populate your list of items available. Here the column _table_name will contain the actual name of the Tables.
Then for each of the product you can have different tables with different number of columns:
Table for Product Type Mobile Phones:
Table for Product Type Furniture:
I hope this will help.