Different non-linear dag execution - directed-acyclic-graphs

have any sample like this architecture not lineal ?
dag1->dag11
|
dag2->dag21->dag22
|
dag3->dag31
|
dag4
dag1/2/3/4 are lineal an depen_on true
Thanks !!!
Luis

Related

reference a markdown table in R markdown

My question is how to reference tables in markdown format like the following because the answer here doesn't work
Referencing a 'hand-made' table using bookdown package
I tried
---
output: html_document
---
you may refer to this table using \#ref(tab:foo)
Table: (\#tab:foo) Your table caption.
+-----------------------+-----------------------+-----------------------+
| Auteur | Protocole | Résultats |
+=======================+=======================+=======================+
| (Jiayi 2011) | Analyse formantique | Diphtongaison de [e |
+-----------------------+-----------------------+-----------------------+
and it didn't work.
it gives "Table : (#tab:foo) Your table caption." as the caption and "you may refer to this table using #ref(tab:foo)" If I cross reference using #ref(tab:foo).
Is it possible also to have automatic numbering ?
Looks like you just need to use bookdown's output formats.
---
output:
bookdown::html_document2:
df_print: paged
---
you may refer to this table using \#ref(tab:foo)
Table: (\#tab:foo) Your table caption.
+-----------------------+-----------------------+-----------------------+
| Auteur | Protocole | Résultats |
+=======================+=======================+=======================+
| (Jiayi 2011) | Analyse formantique | Diphtongaison de [e |
+-----------------------+-----------------------+-----------------------+
The answer here works for me:
I am joining the discussion a bit late, but I just wanted to share a working MWE (based on the earlier answers):
```{r , echo=FALSE, results='asis'}
cat(' Table: (\\#tab:mwe) Example
| Sepal.Length| Sepal.Width| Petal.Length|
|------------:|-----------:|------------:|
| 5.1| 3.5| 1.4|
| 4.9| 3.0| 1.4|
| 4.7| 3.2| 1.3|
| 4.6| 3.1| 1.5|')```
The table can now be reference via \#ref(tab:mwe) in bookdown. This is working for me in pdf and html exports.
Note that if you would like to add greek letters or more complicated sub-or superscripts, you will need to include the following text reference outside of the code chunk
(ref:flower) Flower~dimensions\ example~
```{r , echo=FALSE, results='asis'}
cat(' Table: (\\#tab:mwe) Example with (ref:flower)
| Sepal.Length| Sepal.Width| Petal.Length|
|------------:|-----------:|------------:|
| 5.1| 3.5| 1.4|
| 4.9| 3.0| 1.4|
| 4.7| 3.2| 1.3|
| 4.6| 3.1| 1.5|')```

How do I find change point in a timeseries in PoweBi

I have a group of people who started receiving a specific type of social benefit called benefitA, I am interested in knowing what(if any) social benefits the people in the group might have received immediately before they started receiving BenefitA.
My optimal result would be a table with the number people who was receiving respectively BenefitB, BenefitC and not receiving any benefit “BenefitNon” immediately before they started receiving BenefitA.
My data is organized as a relation database with a Facttabel containing an ID for each person in my data and several dimension tables connected to the facttabel. The important ones here at DimDreamYdelse(showing type of benefit received), DimDreamTid(showing week and year). Here is an example of the raw data.
Data Example
I'm not sure how to approach this in PowerBi as I am fairly new to this program. Any advice is most welcome.
I have tried to solve the problem in SQL but as I need this as part of a running report i need to do it in PowerBi. This bit of code might however give some context to what I want to do.
USE FLISDATA_Beskaeftigelse;
SELECT dbo.FactDream.DimDreamTid , dbo.FactDream.DimDreamBenefit , dbo.DimDreamTid.Aar, dbo.DimDreamTid.UgeIAar, dbo.DimDreamBenefit.Benefit,
FROM dbo.FactDream INNER JOIN
dbo.DimDreamTid ON dbo.FactDream.DimDreamTid = dbo.DimDreamTid.DimDreamTidID INNER JOIN
dbo.DimDreamYdelse ON dbo.FactDream.DimDreamBenefit = dbo.DimDreamYdelse.DimDreamBenefitID
WHERE (dbo.DimDreamYdelse.Ydelse LIKE 'Benefit%') AND (dbo.DimDreamTid.Aar = '2019')
ORDER BY dbo.DimDreamTid.Aar, dbo.DimDreamTid.UgeIAar
I suggest to use PowerQuery to transform your table into more suitable form for your analysis. Things would be much easier if each row of the table represents the "change" of benefit plan like this.
| Person ID | Benefit From | Benefit To | Date |
|-----------|--------------|------------|------------|
| 15 | BenefitNon | BenefitA | 2019-07-01 |
| 15 | BenefitA | BenefitNon | 2019-12-01 |
| 17 | BenefitC | BenefitA | 2019-06-01 |
| 17 | BenefitA | BenefitB | 2019-08-01 |
| 17 | BenefitB | BenefitA | 2019-09-01 |
| ...
Then you can simply count the numbers by COUNTROWS(BenefitChanges) filtering/slicing with both Benefit From and Benefit To.

Google Cloud Platform url resolving

In the billing usage report, links are given in the form of:
com.google.cloud/services/big-query/ActiveStorage
Does this correspond to an actual url? If so, what would that be?
At close look it looks like a namespace, as it's starts with com.
The link you posted actually describes as MeasurementId:
The ID of the type of resource that is being measured. For example,
VmimageN1Standard_1 to represent an n1-standard-1 machine type.
Example: com.google.cloud/services/compute‑engine/VmimageN1Standard_1
also gives an example that contains Resource URI
+-------------+--------------------------------------------------------------+----------+---------+----------------------------------------------------------------------------------------------------+-------------+---------------+
| Report Date | MeasurementId | Quantity | Unit | Resource URI | Resource ID | Location |
+-------------+--------------------------------------------------------------+----------+---------+----------------------------------------------------------------------------------------------------+-------------+---------------+
| 02/13/2014 | com.google.cloud/services/compute-engine/VmimageN1Standard_1 | 86400 | seconds | https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/instances/my-instance | 16557630484 | us-central1-a |
+-------------+--------------------------------------------------------------+----------+---------+----------------------------------------------------------------------------------------------------+-------------+---------------+
I think you could actually use Resource URI instead of MeasurementId to match billing export items.

cucumber Repeat steps

I am learing cucumber and trying to write a feature file.
Following is my feature file.
Feature: Doctors handover Notes Module
Scenario: Search for patients on the bases of filter criteria
Given I am on website login page
When I put username, password and select database:
| Field | Value |
| username | test |
| password | pass |
| database | test|
Then I login to eoasis
Then I click on doctors hand over notes link
And I am on doctors handover notes page
Then I select sites, wards, onCallTeam, grades,potential Discharge, outstanding task,High priority:
| siteList | wardsList | onCallTeamList | gradesList | potentialDischargeCB | outstandingTasksCB | highPriorityCB |
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | null | null | null | null | null |
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | GENERAL MEDICINE | null | null | null | null |
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | GENERAL MEDICINE | CONSULTANT | null | null | null |
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | GENERAL MEDICINE | CONSULTANT | true | null | null |
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | GENERAL MEDICINE | CONSULTANT | true | true | null |
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | GENERAL MEDICINE | CONSULTANT | true | true | true |
Then I click on search button
Then I should see search results
I want to repeat last three steps like I select the search criteria then click on search button and then check search result. So how should I break this feature file. if I use scenario outline then there would be two different scenarios One for login and one for search criteria. Is that fine? Will the session will maintain in that case? Whats the best way to write such feature file.
Or is this a right way to write?
I don't think we can have multiple example sets in a Scenario Outline.
Most of the scenario steps in the example is too procedural to have its own step.
The first three steps could be reduced to something like.
Given I am logged into eoasis as a <user>
Code in the step definition, which could make calls to a separate login method that could take care of updating entering the username, password and selecting database.
Another rule is to avoid statements like "When I click the doctor's handover link". The keyword to avoid here being click. Today its a click, tomorrow it could be drop down or a button. So the focus should be on the functional expectation of the user, which is viewing the handover notes. So we modify this to
When I view the doctor's handover notes link
To summarize, this is how I would write this test.
Scenario Outline: Search for patients on the basis of filter criteria
Given I am logged into eoasis as a <user>
When I view the doctor's handover notes link
And I select sites, wards, onCallTeam, grades, potential Discharge, outstanding task, High priority
And perform a search
Then I should see the search results
Examples:
|sites |wards |onCallTeam |grades |potential Discharge |outstanding task |High priority|
| THE INFIRMARY | INFIRMARY WARD 9 - ASSESSMENT | null | null | null | null | null |
This really is the wrong way to write features. This feature is very declarative, its all about HOW you do something. What a feature should do is explain WHY you are doing something.
Another bad thing this feature does is mix up the details of two different operations, signing in, and searching for patients. Write a feature for each one e.g.
Feature: Signing in
As a doctor
I want my patients data to only be available if I sign in
So I ensure their confidentiality
Scenario: Sign in
Given I am a doctor
When I sign in
Then I should be signed in
Feature: Search for patients
Explain why searching for patients gives value to the doctor
...
You should focus on the name of the feature and the bit at the top that explains why this has value first. If you do that well then the scenarios are much easier to write (look how simple my sign in scenario is).
The art of writing features is doing this bit well, so that you end up with simple scenarios.

Executable Scenarios (BDD) for C++

Does anyone know of a BDD framework for C++ that allows the execution of (Gherkin) scenarios such as:
Feature: Table support in nbehave
Scenario: a table
Given a list of people:
|Name |Country|
|Morgan |Sweden |
|Jimmy |Sweden |
|Jimmy |USA |
When I search for people from Sweden
Then I should find:
|Name |Country|
|Morgan|Sweden |
|Jimmy |Sweden |
I've found a project called Cukebins: https://github.com/paoloambrosio/cukebins/wiki/Release-0.2. I haven't tried it and I don't know how well it works. Renamed to Cucumber-CPP and moved to https://github.com/cucumber/cucumber-cpp/
There's also a discussion with some alternatives here: http://groups.google.com/group/cukes/browse_thread/thread/1f496aba050a22c3/145b871678e2bbbc