Re: Constructing a singleton query from a relational data source



That's a pretty cool query!

--
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. It is for newsgroup
purposes only.

thanks,
bogdan

"Bohdan Szymanik" <bohdan.szymanik@xxxxxxxxxxxxxx> wrote in message
news:ae4f8ffe-7861-46cd-8d43-3e8c9e47cb1b@xxxxxxxxxxxxxxxxxxxxxxx
Ah, for a moment then I thought it might not be possible to create the
singleton query with the generated nested table because I couldn't see how
to create a case - of course you just dummy one up. The working query
becomes:


SELECT
[Model_NB].[Bucket],
TopCount(PredictHistogram([Bucket]), $AdjustedProbability, 3)
From
[Model_NB]
NATURAL PREDICTION JOIN
SHAPE { OPENQUERY(Test, 'SELECT 1 as CaseKey') }
APPEND (
{ OPENQUERY(Test,'
select 1 as ForeignKey, Term
from Terms
cross apply Matches(''some text with terms embedded within it'',''\b('' +
Term + '')\b'')'
)
} RELATE [CaseKey] TO [ForeignKey]
) AS [Msg Term Vectors]
AS T

What I've done is expose the regular expression MatchCollection in the CLR
as a TVF to enable me to pick up the terms in the incoming text. Works
now, thanks, Bohdan


You will need to use the SHAPE clause to use relational queries as
nested
tables:

select prediction of an attribute
from a data mining model
natural prediction join
SHAPE { OPENQUERY(source, 'SELECT CaseKey ... FROM CaseTable ORDER BY
CaseKey') }
APPEND (
{OPENQUERY(source, 'SELECT ForeignKey, NestedColumns... FROM
NestedTable
ORDER BY ForeignKey') }
RELATE CaseKey TO ForeignKey
) AS NestedTable
AS T


--
--
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Please do not send email directly to this alias. It is for newsgroup
purposes only.

thanks,
bogdan

"Bohdan Szymanik" <bohdan.szymanik@xxxxxxxxxxxxxx> wrote in message
news:5222f059-6ddc-49c1-b954-d5fb6a10b68c@xxxxxxxxxxxxxxxxxxxxxxx
I can't seem to do the following (in pseudo code)

select prediction of an attribute
from a data mining model
natural prediction join
(SELECT(
OPENQUERY(source, some select)
) as nested table
) as t

instead I need to manually build up the singleton parameters in a bunch
of
union'd selects.

Am I missing something?




.



Relevant Pages

  • Re: language neutral name
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... query it from there. ...
    (microsoft.public.pocketpc.developer)
  • Re: Lost last field on tables
    ... > no warranties, and confers no rights. ... >> Yes, when I used a query to show all, not in table view. ...
    (microsoft.public.access.replication)
  • Re: 2 questions: uptime and last logged on users
    ... Therefore you can use the query like ... > There's a "SystemUpTime" property. ... > This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: getting pmml
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... >)Where should i execute this query.. ...
    (microsoft.public.sqlserver.datamining)
  • Re: Database query performance
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Indexing of DateTime column does not ... >> To see how the server is handling the query, you can turn on the query ... >> Please reply only to the newsgroup so that others can benefit. ...
    (microsoft.public.dotnet.framework.adonet)