dbTalk Databases Forums  

Dimension Write back

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Dimension Write back in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Renaud Harduin
 
Posts: n/a

Default Dimension Write back - 05-07-2006 , 03:47 PM






Hi,

I saw that SSAS 205 supports dimension writeback.
You can write enable a dimension, but how do you add a member to a given
level for example ?

rgds,

Reno



Reply With Quote
  #2  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: Dimension Write back - 05-08-2006 , 03:15 PM






Open the dimension browser and you can switch to Writeback mode for a
write-enabled dimension. Then you can modify members.

Note that you can't add members to arbitrary levels -- they need to be
leaves in the dimension with a valid parent member.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

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

"Renaud Harduin" <rhm_register-nospam@atyahoodotfr> wrote

Quote:
Hi,

I saw that SSAS 205 supports dimension writeback.
You can write enable a dimension, but how do you add a member to a given
level for example ?

rgds,

Reno




Reply With Quote
  #3  
Old   
Renaud Harduin
 
Posts: n/a

Default Re: Dimension Write back - 05-09-2006 , 02:14 PM



Hi,


How could I do it programmaticaly on a non-parent child dim ? XML/A or MDX
.... I tried to doc. examples but it is not very well specified

Reno


"Akshai Mirchandani [MS]" <akshaim (AT) online (DOT) microsoft.com> a écrit dans le
message de news: uNOYhwtcGHA.1208 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Quote:
Open the dimension browser and you can switch to Writeback mode for a
write-enabled dimension. Then you can modify members.

Note that you can't add members to arbitrary levels -- they need to be
leaves in the dimension with a valid parent member.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

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

"Renaud Harduin" <rhm_register-nospam@atyahoodotfr> wrote in message
news:445e5ce1$0$2478$79c14f64 (AT) nan-newsreader-05 (DOT) noos.net...
Hi,

I saw that SSAS 205 supports dimension writeback.
You can write enable a dimension, but how do you add a member to a given
level for example ?

rgds,

Reno






Reply With Quote
  #4  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: Dimension Write back - 05-09-2006 , 07:40 PM



You would have to use the XML form of the request -- the MDX writeback form
only allows modifying a p/c dimension.

The XMLA syntax looks something like this (e.g.
http://msdn2.microsoft.com/en-US/lib...s186623.aspx):

<Update>
<Object>...</Object>
[<MoveWithDescendants>...</MoveWithDescendants>]
<Attributes>...</Attributes>
<Where>...</Where>
</Update>

And similar patterns for Insert/Drop. Essentially, it says:
- for this dimension (identified by Object)
- update the specified contents of the specified attributes
- but only for the members whose attribute keys are specified in the Where
section

My suggestion would be to use Profiler against the server and use the
dimension editor to perform write operations. Then examine the XMLA requests
for the operations that you are interested in.

HTH,
Akshai

--
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

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


"Renaud Harduin" <rhm_register-nospam@atyahoodotfr> wrote

Quote:
Hi,


How could I do it programmaticaly on a non-parent child dim ? XML/A or
MDX ... I tried to doc. examples but it is not very well specified

Reno


"Akshai Mirchandani [MS]" <akshaim (AT) online (DOT) microsoft.com> a écrit dans le
message de news: uNOYhwtcGHA.1208 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Open the dimension browser and you can switch to Writeback mode for a
write-enabled dimension. Then you can modify members.

Note that you can't add members to arbitrary levels -- they need to be
leaves in the dimension with a valid parent member.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

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

"Renaud Harduin" <rhm_register-nospam@atyahoodotfr> wrote in message
news:445e5ce1$0$2478$79c14f64 (AT) nan-newsreader-05 (DOT) noos.net...
Hi,

I saw that SSAS 205 supports dimension writeback.
You can write enable a dimension, but how do you add a member to a given
level for example ?

rgds,

Reno








Reply With Quote
  #5  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Dimension Write back - 05-09-2006 , 07:51 PM



BOL describes an ALTER DIMENSION syntax, but couldn't figure out how to
make this work (no examples given).


The dimension browser mentioned by Akshai issues XMLA like:

<Insert xsi:type="Insert" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<Database>AdventureWorks</Database>
<Cube>$Scenario</Cube>
<Dimension>Scenario</Dimension>
</Object>
<Attributes>
<Attribute>
<AttributeName>Scenario</AttributeName>
<Name>TestWrite</Name>
</Attribute>
</Attributes>
</Insert>


http://msdn2.microsoft.com/en-us/library/ms145536.aspx
Quote:
Using Dimension Writebacks (MDX)

Dimension writeback provides a method of modifying a dimension's data,
reflecting the deletion, creation, and updating of attribute values.
Complex operations, such as deleting an entire sub-tree in a hierarchy
and promoting the children of a deleted member can be accomplished.

To writeback or update a dimension, you use the ALTER DIMENSION
statement. The following syntax shows the format that the ALTER
DIMENSION statement uses:

Copy CodeALTER DIMENSION <dimension> <alter_statement> [,
<alter_statement> ... ]

<alter_statement> ::= <create_statement> | <update_statement> |
<remove_statement>

<create_statement> ::= CREATE ATTRIBUTE VALUE
<attribute_name>
NAME='<name_value>',
KEY='<key_value>'
[,TRANSLATIONS.<lang_name> = '<loc_value>'
[,TRANSLATIONS.<lang_name> = '< loc_value>' ... ]]
[,<relattribute_name>.KEY = '<relkey_value>'
[,<relattribute_name>.KEY = '<relkey_value>'
… ]]

<update_statement> ::= UPDATE ATTRIBUTE VALUE
<attribute_name>.{<attr_name> | <attr_key>}
[NAME='<name_value>',]
[,TRANSLATIONS.<lang_name> = '<loc_value>'
[,TRANSLATIONS.<lang_name> = '< loc_value>' ... ]]
[,<relattribute_name>.KEY = '<relkey_value>'
[,<relattribute_name>.KEY = '<relkey_value>'
… ]]

<remove_statement> ::= DROP ATTRIBUTE VALUE
<attribute_name>.{<attr_name> | <attr_key>}
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #6  
Old   
Renaud Harduin
 
Posts: n/a

Default Re: Dimension Write back - 05-10-2006 , 01:59 PM



Hi Akshai, Hi Deepak,

I will try it and I keep you informed
Thk's a lot


"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> a écrit dans le message de news:
uAA7cv8cGHA.4720 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Quote:
BOL describes an ALTER DIMENSION syntax, but couldn't figure out how to
make this work (no examples given).


The dimension browser mentioned by Akshai issues XMLA like:

Insert xsi:type="Insert" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"
Object
Database>AdventureWorks</Database
Cube>$Scenario</Cube
Dimension>Scenario</Dimension
/Object
Attributes
Attribute
AttributeName>Scenario</AttributeName
Name>TestWrite</Name
/Attribute
/Attributes
/Insert


http://msdn2.microsoft.com/en-us/library/ms145536.aspx

Using Dimension Writebacks (MDX)

Dimension writeback provides a method of modifying a dimension's data,
reflecting the deletion, creation, and updating of attribute values.
Complex operations, such as deleting an entire sub-tree in a hierarchy
and promoting the children of a deleted member can be accomplished.

To writeback or update a dimension, you use the ALTER DIMENSION
statement. The following syntax shows the format that the ALTER
DIMENSION statement uses:

Copy CodeALTER DIMENSION <dimension> <alter_statement> [,
alter_statement> ... ]

alter_statement> ::= <create_statement> | <update_statement> |
remove_statement

create_statement> ::= CREATE ATTRIBUTE VALUE
attribute_name
NAME='<name_value>',
KEY='<key_value>'
[,TRANSLATIONS.<lang_name> = '<loc_value>'
[,TRANSLATIONS.<lang_name> = '< loc_value>' ... ]]
[,<relattribute_name>.KEY = '<relkey_value>'
[,<relattribute_name>.KEY = '<relkey_value>'
. ]]

update_statement> ::= UPDATE ATTRIBUTE VALUE
attribute_name>.{<attr_name> | <attr_key>}
[NAME='<name_value>',]
[,TRANSLATIONS.<lang_name> = '<loc_value>'
[,TRANSLATIONS.<lang_name> = '< loc_value>' ... ]]
[,<relattribute_name>.KEY = '<relkey_value>'
[,<relattribute_name>.KEY = '<relkey_value>'
. ]]

remove_statement> ::= DROP ATTRIBUTE VALUE
attribute_name>.{<attr_name> | <attr_key>}



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***



Reply With Quote
  #7  
Old   
Renaud Harduin
 
Posts: n/a

Default Re: Dimension Write back - 05-15-2006 , 04:39 PM



then it works but I got exeption ...

If needed, I will post about that

"Renaud Harduin" <rhm_register-nospam@atyahoodotfr> wrote

Quote:
Hi Akshai, Hi Deepak,

I will try it and I keep you informed
Thk's a lot


"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> a écrit dans le message de
news: uAA7cv8cGHA.4720 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
BOL describes an ALTER DIMENSION syntax, but couldn't figure out how to
make this work (no examples given).


The dimension browser mentioned by Akshai issues XMLA like:

Insert xsi:type="Insert" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"
Object
Database>AdventureWorks</Database
Cube>$Scenario</Cube
Dimension>Scenario</Dimension
/Object
Attributes
Attribute
AttributeName>Scenario</AttributeName
Name>TestWrite</Name
/Attribute
/Attributes
/Insert


http://msdn2.microsoft.com/en-us/library/ms145536.aspx

Using Dimension Writebacks (MDX)

Dimension writeback provides a method of modifying a dimension's data,
reflecting the deletion, creation, and updating of attribute values.
Complex operations, such as deleting an entire sub-tree in a hierarchy
and promoting the children of a deleted member can be accomplished.

To writeback or update a dimension, you use the ALTER DIMENSION
statement. The following syntax shows the format that the ALTER
DIMENSION statement uses:

Copy CodeALTER DIMENSION <dimension> <alter_statement> [,
alter_statement> ... ]

alter_statement> ::= <create_statement> | <update_statement> |
remove_statement

create_statement> ::= CREATE ATTRIBUTE VALUE
attribute_name
NAME='<name_value>',
KEY='<key_value>'
[,TRANSLATIONS.<lang_name> = '<loc_value>'
[,TRANSLATIONS.<lang_name> = '< loc_value>' ... ]]
[,<relattribute_name>.KEY = '<relkey_value>'
[,<relattribute_name>.KEY = '<relkey_value>'
. ]]

update_statement> ::= UPDATE ATTRIBUTE VALUE
attribute_name>.{<attr_name> | <attr_key>}
[NAME='<name_value>',]
[,TRANSLATIONS.<lang_name> = '<loc_value>'
[,TRANSLATIONS.<lang_name> = '< loc_value>' ... ]]
[,<relattribute_name>.KEY = '<relkey_value>'
[,<relattribute_name>.KEY = '<relkey_value>'
. ]]

remove_statement> ::= DROP ATTRIBUTE VALUE
attribute_name>.{<attr_name> | <attr_key>}



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.