Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Sunday, March 25, 2012

Data source connection to SAS via SS05

Hi all, does anyone have a sample (or knows of one on the web, maybe screenshots) of how to connect via SQL Server 2005 to a SAS box? The SAS machine is Unix, I am able to connect via Enterprise Guide from my local machine - which is also runing SS05 Developer. I'm investingating the possibility of building a cube of off a SAS dataset.

Thanks in advance.

Mark

Two things to keep in mind when building a cube. First, you have to have a driver with which SSAS can connect to the data source and through which SSAS can build objects within the DSV. Next, you need to have a cartridge with which SSAS can construct query statements to pull data from the data source.

You might be able to present SAS objects through SQL Server views using the OPENROWSET function. (This may be where you are already headed.) So, is there a way to connect SQL Server Database Engine to SAS using OPENROWSET?

One other thing, SAS has their own OLAP solution. Is that an option for you?

B.

|||

Ho Bryan,

I went in a different direction (FTP text files for awhile), but am re-visiting this now. We don't have the SAS OLAP Server in house, so unfortunately that isn't an option. However, is there a SAS/MSFT web-site where cartriges can be obtained from? I'm able to connect to the SAS box and can see the SAS datasets, but, I can't render them. Its literally the last step that's blowing up, and I believe it may be cartrige driven.

Thanks,

Mark

|||

Sorry to say I'm not aware of any cartridges other than those provided by default. Worst case, can you perform an OPENROWSET query through SQL Server? If so, you might be able to construct a query in SQL Server using OPENROWSET against SAS which would faciliate processing. Still, no guarantees that would work.

B.

Data source connection to SAS via SS05

Hi all, does anyone have a sample (or knows of one on the web, maybe screenshots) of how to connect via SQL Server 2005 to a SAS box? The SAS machine is Unix, I am able to connect via Enterprise Guide from my local machine - which is also runing SS05 Developer. I'm investingating the possibility of building a cube of off a SAS dataset.

Thanks in advance.

Mark

Two things to keep in mind when building a cube. First, you have to have a driver with which SSAS can connect to the data source and through which SSAS can build objects within the DSV. Next, you need to have a cartridge with which SSAS can construct query statements to pull data from the data source.

You might be able to present SAS objects through SQL Server views using the OPENROWSET function. (This may be where you are already headed.) So, is there a way to connect SQL Server Database Engine to SAS using OPENROWSET?

One other thing, SAS has their own OLAP solution. Is that an option for you?

B.

|||

Ho Bryan,

I went in a different direction (FTP text files for awhile), but am re-visiting this now. We don't have the SAS OLAP Server in house, so unfortunately that isn't an option. However, is there a SAS/MSFT web-site where cartriges can be obtained from? I'm able to connect to the SAS box and can see the SAS datasets, but, I can't render them. Its literally the last step that's blowing up, and I believe it may be cartrige driven.

Thanks,

Mark

|||

Sorry to say I'm not aware of any cartridges other than those provided by default. Worst case, can you perform an OPENROWSET query through SQL Server? If so, you might be able to construct a query in SQL Server using OPENROWSET against SAS which would faciliate processing. Still, no guarantees that would work.

B.

Monday, March 19, 2012

data processing extension sample

I'm trying to write some code to retrieve a reports list from a report folder.
Is it possible to create data processing extension in old asp? Either yes
or no, could someone post a link to some sample code, aspx samples would be
just fine?I forgot to mention that I only know VB. So please provide the samples in
VB. Thx a mil!
"JL" wrote:
> I'm trying to write some code to retrieve a reports list from a report folder.
> Is it possible to create data processing extension in old asp? Either yes
> or no, could someone post a link to some sample code, aspx samples would be
> just fine?|||http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5
try this one. the best i have found.
[]s
Renato
"JL" <JL@.discussions.microsoft.com> escreveu na mensagem
news:1E1F4C39-7C3E-4263-B883-D2865507C968@.microsoft.com...
> I forgot to mention that I only know VB. So please provide the samples in
> VB. Thx a mil!
> "JL" wrote:
> > I'm trying to write some code to retrieve a reports list from a report
folder.
> >
> > Is it possible to create data processing extension in old asp? Either
yes
> > or no, could someone post a link to some sample code, aspx samples would
be
> > just fine?|||Thx a lot. But I only want to retrieve the reports list from a report
folder. Do I need to use the same extension? Or is there an alternative
(easier) way? Thx.
"Renato Aloi" wrote:
> http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5
> try this one. the best i have found.
> []s
> Renato
> "JL" <JL@.discussions.microsoft.com> escreveu na mensagem
> news:1E1F4C39-7C3E-4263-B883-D2865507C968@.microsoft.com...
> > I forgot to mention that I only know VB. So please provide the samples in
> > VB. Thx a mil!
> >
> > "JL" wrote:
> >
> > > I'm trying to write some code to retrieve a reports list from a report
> folder.
> > >
> > > Is it possible to create data processing extension in old asp? Either
> yes
> > > or no, could someone post a link to some sample code, aspx samples would
> be
> > > just fine?
>
>|||I saw a sample that demonstrate this... But I don't remmember where... What
I remmember is that you can write some code to do that, using ListChildren
method of Reporting Service Web Server, like this:
dim items() as CatalogItem
items = (new ReportingService).ListChildren("/", True)
then populate a list:
for each item as CatalogItem in items
cboWhatever.Items.Add(new ReportItem(item.name, item.Path))
next
That is it. Do not forget to reference the RS web service...
[]s
Renato
"JL" <JL@.discussions.microsoft.com> escreveu na mensagem
news:F408C4D6-DB48-40F1-A6A5-22BE8E958114@.microsoft.com...
> Thx a lot. But I only want to retrieve the reports list from a report
> folder. Do I need to use the same extension? Or is there an alternative
> (easier) way? Thx.
> "Renato Aloi" wrote:
> >
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5
> >
> > try this one. the best i have found.
> >
> > []s
> > Renato
> >
> > "JL" <JL@.discussions.microsoft.com> escreveu na mensagem
> > news:1E1F4C39-7C3E-4263-B883-D2865507C968@.microsoft.com...
> > > I forgot to mention that I only know VB. So please provide the
samples in
> > > VB. Thx a mil!
> > >
> > > "JL" wrote:
> > >
> > > > I'm trying to write some code to retrieve a reports list from a
report
> > folder.
> > > >
> > > > Is it possible to create data processing extension in old asp?
Either
> > yes
> > > > or no, could someone post a link to some sample code, aspx samples
would
> > be
> > > > just fine?
> >
> >
> >

Data Processing Extension - parameters not created

Hi,
I'm writing a Data Processing Extension (DPE) for Reporting Services 2000,
using the FsiExtension sample as a basis. My problem is that the
CreateParameter method of the command class doesn't get called, so when I am
to execute my datareader, the parameters aren't there. I have added the
parameters manually to the dataset in the report, but they don't get carried
over to the DPE. I've debugged the code, and the CreateParameter never gets
called. The strange thing is that I had it working earlier, because I then
could access the parameter collection in the debugger, but now suddenly it
fails.
public IDataParameter CreateParameter()
{
return (IDataParameter)(new dbpDataParameter());
}
Any tips?
Brgds
JonasI found the problem, my class only implemented IDbComamand. When I added
IDbCommandAnalysis and
a GetParameters method it worked like it should.
/Jonas
"Jonas" <Jonas@.nospam.pl> wrote in message
news:OyFcwrwiGHA.4512@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I'm writing a Data Processing Extension (DPE) for Reporting Services 2000,
> using the FsiExtension sample as a basis. My problem is that the
> CreateParameter method of the command class doesn't get called, so when I
> am to execute my datareader, the parameters aren't there. I have added the
> parameters manually to the dataset in the report, but they don't get
> carried over to the DPE. I've debugged the code, and the CreateParameter
> never gets called. The strange thing is that I had it working earlier,
> because I then could access the parameter collection in the debugger, but
> now suddenly it fails.
> public IDataParameter CreateParameter()
> {
> return (IDataParameter)(new dbpDataParameter());
> }
>
> Any tips?
> Brgds
> Jonas
>

Data partition view

Hi ,
I have question regard data partition view .

Please see below sample from BOL + sample of execution plane .

I would like to ask what is the way to avoid the optimizer scan tables out of the scope (I would expect that the only table for this query will be SUPPLY1)

Thanks,
Eyal

--This example uses tables named SUPPLY1, SUPPLY2, SUPPLY3, and SUPPLY4, which correspond to the supplier tables from four offices, located in different countries/regions.
USE tempdb
GO

--create the tables and insert the values
CREATE TABLE SUPPLY1 (
supplyID INT PRIMARY KEY CHECK (supplyID BETWEEN 1 and 150),
supplier CHAR(50)
)
CREATE TABLE SUPPLY2 (
supplyID INT PRIMARY KEY CHECK (supplyID BETWEEN 151 and 300),
supplier CHAR(50)
)
CREATE TABLE SUPPLY3 (
supplyID INT PRIMARY KEY CHECK (supplyID BETWEEN 301 and 450),
supplier CHAR(50)
)
CREATE TABLE SUPPLY4 (
supplyID INT PRIMARY KEY CHECK (supplyID BETWEEN 451 and 600),
supplier CHAR(50)
)
GO
--create the view that combines all supplier tables
CREATE VIEW all_supplier_view
AS
SELECT *
FROM SUPPLY1
UNION ALL
SELECT *
FROM SUPPLY2
UNION ALL
SELECT *
FROM SUPPLY3
UNION ALL
SELECT *
FROM SUPPLY4
GO

INSERT all_supplier_view VALUES ('1', 'CaliforniaCorp')
INSERT all_supplier_view VALUES ('5', 'BraziliaLtd')
INSERT all_supplier_view VALUES ('231', 'FarEast')
INSERT all_supplier_view VALUES ('280', 'NZ')
INSERT all_supplier_view VALUES ('321', 'EuroGroup')
INSERT all_supplier_view VALUES ('442', 'UKArchip')
INSERT all_supplier_view VALUES ('475', 'India')
INSERT all_supplier_view VALUES ('521', 'Afrique')

GO
/* */
SELECT * FROM all_supplier_view WHERE supplyID BETWEEN 1 and 150First

THAT'S A GREAT POST

Second

While you see the optimizer plan, if you look at the number of executes for the other three, you'll see 0. It never did anywork...

And you got Index seeks going on in parallel...

pretty damn effecient, no?

Don't do sample tests in tempdb though, and provide clean up DROPs with the sample...otherwise PERFECT|||Thanks on the compliments.

I have send only sample.
I have almost the same design in a production environment with ~ 1-20 million records per each physical table.

I need to data from only one table with around 3 million recodes in most of the queries.
but I have other table with ~20 million recodes. It means that most on the execution time is useless.

I have done test with direct query to the correct physical table and got the result in 10% of the time!! Vs query the partition view .

I though that partition data view was planed to deal with such cases .

Thanks a lot ,
Eyal|||Are you saying you need to return 3 million records?

I must be misinterpreting...

What does the plan say for the large volume?

Does it show the number of executes other than 0 for the other three?

Are these the only columns in the table?

It doesn't say it, but because the other column is not in the index, it has to go to the data page to get the other column...make a non unique index on the other column...

I'll test it out and see what it does...|||1.I mean that the number of records in the target physical table are ~ 3 melon records vs. ~ 20 million records in other physical table (each physical table means other quarter). The output of the tested query was 7,000 rows.
2.The plans show 1 as number of executes for the other tree tables
3.In my tables there are 5 primary keys ( the DataID is one of it , this one is used as partition constraint) and other 10 measurement columns

eyal|||Well, ok then...

what are you going to do with 7,000 rows? can't be OLTP...are doing batch work against them?|||I insert the result to Daily table group by the extract date and one of the primary keys (means get yesterday records group by on of the rest 4 keys).

This is daily job use to reporting purpose .
Eyal|||I may be wrong, but I don't think you can avoid the reference to other tables participating the view, simply because the view is UNION-based.

Thursday, March 8, 2012

Data Mining in SSAS where is the sample?

I heard a lot about Data Mining but cannot make use of it yet. I see Adventure Works SSAS database do not have any sample for the Mining.

Can any of you geniuses know that where I can find the SSAS database sample database with Data Mining in it?

Please don't reply that the sample for Data Mining are there in "C:\Program Files\Microsoft SQL Server\...\Samples" directory. These are not really a mining model samples.

Thanks in advance.

Anand @. CSSI

Hi,

You should find it in the Adventure Works DW project.

C:\Program Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks Analysis Services Project

There are five data mining models in there.

Hope it helps,

Matt

|||

Thanks for reply Matt, Well, this is not what I was looking for...

If you see the directory structure you will notice there is no SSAS database with Mining Model. There are just sample for Data Mining Web Control along with SQL Server Data Mining Plug-in. Again, this is not what I am looking at.

Folder Structure

+90
| +COM
| +DTS
| +EULA
| +NotificationServices
| +Samples
| | +Analysis Services
| | | +Administrator
| | | +DataMining
| | | | +Data Mining Web Controls
| | | | \SQL Server Data Mining Plug-In Algorithms
| | | +Programmability
| | | \Tutorials
| | +Engine
| | +Notification Services
| | +Replication
| | \Reporting Services
| +SDK

Still any questions, let me know.

|||

Hi,

I have a different set of samples and not in that samples directory, in the tools.

You could try downloading, that might contain the Adventure Works DW Project.

http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en

http://download.microsoft.com/download/d/8/6/d865cf0c-c44b-401b-b426-b3bf5c628112/SQLServerDatabasesAndSamplesOverview.htm

Any better?

Matt