olap | 1、查询2017年1月份,时间窗口为7天,事件顺序为10001、10004、10008的漏斗,结果为 [
kandi X-RAY | olap Summary
kandi X-RAY | olap Summary
1、查询2017年1月份,时间窗口为7天,事件顺序为10001、10004、10008的漏斗,结果为[3999974, 3995900, 3608934],21s SELECT ld_sum(xwho_state, 3) FROM (SELECT ld_count(xwhen, 7 * 86400000, xwhat_id, '10001,10004,10008') AS xwho_state FROM t_funnel_devicelog WHERE day >= '20170101' AND day <= '20170131' AND xwhat_id IN (10004, 10001, 10008) GROUP BY xwho ) a;. 2、查询2017年1月份,时间窗口为3天,事件顺序为10004、10008、10010的漏斗,结果为[3999422,3573367,697506],11s SELECT ld_sum(xwho_state, 3) FROM (SELECT ld_count(xwhen, 3 * 86400000, xwhat_id, '10004,10008,10010') AS xwho_state FROM t_funnel_devicelog WHERE day >= '20170101' AND day <= '20170131' AND xwhat_id IN (10004, 10010, 10008) GROUP BY xwho ) a;. 3、查询2017年1月份,时间窗口为3天,事件顺序为10004、10007、10009、10010,并且10004事件的brand属性为’Apple’的漏斗,结果为[3639301, 2449480, 559517, 35795],14s SELECT ld_sum(xwho_state, 4) FROM (SELECT ld_count(xwhen, 3 * 86400000, xwhat_id, '10004,10007,10009,10010') AS xwho_state FROM t_funnel_devicelog WHERE day >= '20170101' AND day <= '20170131' AND (xwhat_id IN (10007, 10009, 10010) OR xwhat_id = 10004 AND view_brand = 'Apple') GROUP BY xwho ) a;.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Write slice
- Input function
- Output slice
- Combine two slice state
- Combine two slices
- Input function
olap Key Features
olap Examples and Code Snippets
Community Discussions
Trending Discussions on olap
QUESTION
i am trying to fetch the results of a SQL query run on an Oracle Database. I have manged to get the output using the below code where the run_sqlplus function runs the query.
...ANSWER
Answered 2022-Mar-09 at 14:20It’s a lot easier to use the cx_oracle driver for this but if you insist in using sqlplus, use the -s (silent) and the -L flags to make it a bit better.
Advice: switch to cx_Oracle since it gives better control and it is also easier to hide your credentials while the process is running.
QUESTION
I want to use Clickhouse as an OLAP and PostgreSQL as an OLTP database.
The problem is that queries to Clickhouse run slower than on Postgres. The query is as below:
...ANSWER
Answered 2022-Feb-20 at 21:45There are ways to shoot your feet with Clickhouse
QUESTION
I have severe trouble deploying a cube project from a development machine to a SSAS-server.
No matter, what I try, a connection ›cannot be made‹, although everything seems to be fine.
This is the situation:
Server:
DNS: db.mydomain.at
Windows-Name: DB
Installed Software:
Windows Server 2019 Standard; standalone
MS SQL Server 2019 DevEd
Running Services:
MSSQL:
Logins:
DB\test (integrated sec., able to connect in Mgmt Studio locally & remote)
Db-User DB\test (for login DB\test)
SSAS:
Login:
DB\test (integr. sec, able to connect in Mgmt Studio locally & remote)
SQLBrowser running
SQLAgent running
Firewall: Port 2383 open
OS-account DB\test is member of SQLServerMSASUser$DB$MSSQLServer and of SSAS-Admin (so he can create databases)
Client:
no DNS-Name
Windows-Name: DEV
Installed software:
Win 10
VS 2019 community
MSDT AS
SSMS
User: DEV\test (with same password as DB\test)
Data Source:
I tried with servers: db.mydomain.at, db & DB.
(Ping works for all 4.)
I tried all 4 ›impersonations‹:
Errors differ, but invariably lead to ›a connection cannot be made‹,
although a database has been created on the OLAP-server!
Creating and transferring an xmla-file (as indicated in Q1215053) is not feasible, the solution has to be online.
Any hint, what I'm missing, would be highly appreciated!
Add: Further experiments yielded the following:
I played around with the ›impersonation‹ (the credentials, the OLAP-server uses to fetch data from the OLTP-server – as I understand it).
Specific Windows user name: DB\test: ›Login is from untrusted domain‹.
test: ›Login is from untrusted domain‹.
Service account: ›Login failed for NT AUTHORITY\ANONYMOUS LOGON‹
(Tried with NT Service\MSSQLServerOLAPService and LocalSystem as logon accounts for SSAS.)
Credentials of current user: ›ImpersonationMode that is not supported‹
Inherited: ›Login failed for NT AUTHORITY\ANONYMOUS LOGON‹
...ANSWER
Answered 2022-Feb-10 at 16:47Problem was a misconfigured server; solution was to fully qualify the server's computer name.
The server had of course a ›Computer name‹ (›db‹, NetBIOS name ›DB‹), but the ›full computer name‹ also was ›db‹ and the DNS suffix was missing. I added a ›Primary DNS suffix for the computer‹: ›mydomain.at‹ and the project happily deployed.
QUESTION
ANSWER
Answered 2022-Feb-07 at 09:26Drill down and roll up functions are inverse and allow you to add and remove granularity in axes like a zoom.
- a roll up - less granularity in the target table (for example years instead of months)
- a drill down - more granularity in the target table (months instead of years)
- neither of these two - there is other data in the tables
A three-dimensional cube is given, where the dimensions are:
Geography
Time
Product
Values are sales volumes (SUM (Sales.numberSold)
).
Let's call this source cube Z
.
In the end, A
, B
, and C
show only two dimensions:
Geography
Time
The Product
is always shrunk into one dimension.
A
:
The Product
is shrunk into one dimension by the slice for Product.ProductFamily = "video"
Z
rollup on Product (from ArticleName to ProductFamily)
slice for Product.ProductFamily = "video"
rollup on Time (from Day to Year)
slice for Time.Year = 2000
rollup on Geography (from BranchName to Country)
slice for Geography.Country = "Germany"
drill down Geography from Country to Region
drill down Time from Year to Month
A
B
:
The Product
is shrunk into one dimension by rollup on Product (from ArticleName to All)
.
The B
is formed from the Z
with the same granularity of rollups and drills down.
The result of query B
is neither of these two in comparison to the result of query A
.
Z
rollup on Product (from ArticleName to All)
rollup on Time (from Day to Year)
slice for Time.Year = 2000
rollup on Geography (from BranchName to Country)
slice for Geography.Country = "Germany"
drill down Geography from Country to Region
drill down Time from Year to Month
B
C
:
The Product
is shrunk into one dimension the same way as in Cube A
.
So the only difference is in granularity.
The C
is more detailed.
The result of query C
is a drill down in comparison to the result of query A
.
A
drill down Geography (from Region to City)
C
Data Warehousing - OLAP on tutorialspoint
Online analytical processing on wikipedia
OLAP Operations in the Multidimensional Data Model on javatpoint
QUESTION
I have no idea about the MDX query. I am trying to generate a query for data retrieved in Excel from cubes connected through SQL Server Analysis Services.
Can I use the OLAP Pivot Table extension used to generate the MDX query? Is it safe to install from here
How else can I generate an MDX query?
...ANSWER
Answered 2022-Jan-07 at 14:26I wrote OLAP PivotTable Extensions. It is open source so if you have concerns about it’s safety feel free to study the source. The latest release download gets flagged as not being commonly downloaded because it’s new I assume.
OLAP PivotTable Extensions will show you the MDX query which a PivotTable over SSAS is running. Is that what you meant by “generate”?
QUESTION
In recent months I faced a problem regarding daily automatic proccessing of our olap cube model. And the main problem is that this error message appears irregularly. That is, during the day, sometimes the processing is successful, sometimes an error crashes after 10 minutes
The error message goes as follows:
Microsoft.AnalysisServices.Xmla.XmlaException: The JSON DDL request failed with the following error: Failed to execute XMLA. Error returned: 'OLE DB or ODBC error: [DataSource.Error] PostgreSQL: Exception while reading from stream.OLE DB or ODBC error: [DataSource.Error] PostgreSQL: Exception while reading from stream.OLE DB or ODBC error: The command has been canceled..'.. at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader XmlaResult xmlaResult Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader XmlaResult xmlaResult Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException Boolean readSession Boolean readNamespaceCompatibility) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result Boolean skipResult) at Microsoft.AnalysisServices.Xmla.XmlaClient.ExecuteStatement(String statement String properties String& result Boolean skipResult Boolean propertiesXmlIsComplete) at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command String properties String& result Boolean skipResult Boolean propertiesXmlIsComplete) at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.ExecuteStatement(String stmt StatementType stmtType Boolean withResults String properties String parameters Boolean restrictionListElement String discoverType String catalog) at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.SendCommand(String command Boolean withResults String properties) at OlapEvent(SCH_STEP* pStep SUBSYSTEM* pSubSystem SUBSYSTEMPARAMS* pSubSystemParams Boolean fQueryFlag)
I have tried to set various timeouts: RemoteQueryTimeout (from 600 to bigger numbers like 2000 or even 0 for no timeout), ExternalCommandTimeout, ExternalConnectionTimeou, ForceCommitTimeout
Nothing helped and the error is still here
Has anyone faced that kind of problem? To be honest, I no longer know what the problem is and how it can be solved
Thank you in advance
...ANSWER
Answered 2021-Nov-29 at 14:56Well, I found a solution. The solution was to add “commandTimeout”:”PT1H”
for 1 hour timeout as a condition while connecting to database
QUESTION
Oracle sys user database connection with ORACLE_SID is not working. dev is my ORACLE_SID .
...ANSWER
Answered 2021-Nov-25 at 11:37Following was the root cause:
remote_login_passwordfile parameter was set to EXCLUSIVE
QUESTION
My company is developing a SaaS service to store events and provide analytics through dashboards.
Since we won't have deletes or updates, the idea is to create a columnar-based, OLAP architecture to benefit from compression and latency it provides, and PostgreSQL Citus is one platform we intend to evaluate.
The overall architecture is pretty standard: an API will receive the events and then store them on Kafka in JSON format. Then, those events will be sent to PostgreSQL. Some fields will be "jsonb" data type.
By reading the docs, the best practice is distribute tables by tenant id.
Just wanted to doucle-check a few things and would greatly appreciate someone's input:
- Does the architecture described above make sense? Is there anything we should change or pay attention to?
- Are there limitations in the number of nodes or shards that can be scaled out for this columnar approach?
- Is GIN index supported? (I believe it is, since it's not listed in 'Limitations')
Thanks!
...ANSWER
Answered 2021-Nov-22 at 07:46I've used citus for a multi-tenant service and distributing tables by the tenant id worked pretty well.
The overall architecture that you described makes sense but I'm not sure if someone from outside or at least without some details can give you much more to work with. Sending events through Kafka and processing them to be stored somewhere is a pretty standard way of working with events these days so nothing crazy is happening there.
There seem to be no limitations to scale out in terms of the number of nodes but what you should keep in mind is that how you set your shards count from the start. re-balancing will lock your tables and can take a while to finish so you want to keep it as small and easy to process as you can. Take a look here for more details: https://docs.citusdata.com/en/v10.2/faq/faq.html#how-do-i-choose-the-shard-count-when-i-hash-partition-my-data
GIN indexes are supported as they used it in their examples: https://docs.citusdata.com/en/v10.2/use_cases/multi_tenant.html?highlight=GIN#when-data-differs-across-tenants
Also, note that you won't have failover support in the community version. You have to go with the enterprise version which supports failover and also allows you to rebalance the tables without locking the entire table.
I wrote a simple service to handle the failover which you can use: https://github.com/Navid2zp/citus-failover
QUESTION
I'd like to run a macro which will update to extracts by selecting today()-1 in slicers with Macro. But I can't get it work.
I've tried to get date from cell value, and tried with Date and Now functions too. None of them worked. Anyone with any idea?
I get:
- Run-time error '1004' String can't be converted to type date. or
- Run-time error '1004' The item couldn't be found in OLAP Cube.
ANSWER
Answered 2021-Nov-19 at 07:44Sub Update_date()
'
' Update_date Macro
'
'
' Update_date Macro
'
Dim MyDate As Range
Dim MyDate2
Set MyDate = ThisWorkbook.Worksheets("Slicers").Range("D2")
MyDate2 = Format(MyDate, "yyyy-MM-ddTHH:mm:ss") ' <- Had to convert date to this format.
'
ActiveWorkbook.SlicerCaches("Slicer_Ship_Date").VisibleSlicerItemsList = Array _
( _
"[Sales Orders].[Ship Date].&[" & MyDate2 & "]")
ActiveWorkbook.SlicerCaches("Slicer_Ship_Date1").VisibleSlicerItemsList = Array _
( _
"[Sales Orders].[Ship Date].&[" & MyDate2 & "]")
End Sub
QUESTION
I got a multidimensional OLAP-Cube that attracts my MS SQL Server Database. By now, there was no need for row level security. Now, we would like to grant access to different sales representatives with Excel-Sheets that have a Live-conneciton to Analysis Services - so every salesman could evaluate the revenues in his sales territory.
This is my data example:
I build a role to restrict the access for the first salesman by customizing the access to dimension data:
Then I tested my new role and got the following result:
result of product table after restriction
result of customer table after restriction
The restricted role still can see the whole data of the product table and the total amount of the customer table, although the totals are disabled:
Does anyone one my mistake I did when setting up the new role?
The result, I would like to see after restriction should be this way:
I hope that someone can help me despite the small amount of information. Thank you so much!
...ANSWER
Answered 2021-Oct-27 at 10:27I believe you can achieve this if you tick "Enable Visual Totals" at the bottom of the popup:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
Install olap
You can use olap like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the olap component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page