Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
martines
New Member

TMSL refresh from several databases - Bad Request

Hello all!

 

I am trying to setup a TMSL script to refresh a table in several datasets. I have tried looking for a solution and browsing online without any luck.

I am trying with an xmla script like this one:

 

 

{
	"sequence":
	{
		"maxParallelism": 1,
		"operations": [
			{
				"refresh": {
					"type": "calculate",
					"objects": [
					{
						"database": "DB1",
						"table": "Table1"
					}
				]
				}
			},
			{
				"refresh": {
					"type": "calculate",
					"objects": [
					{
						"database": "DB2",
						"table": "Table1"
					}
				]
				}
			}
		]
	}
}

 

 

 

The error I am getting is:

The remote server returned an error: (400) Bad Request.

Technical Details:
RootActivityId: b4ccf9fc-7c1e-493b-9180-6008019fc555
Date (UTC): 1/10/2023 4:15:55 PM
Run complete

 

If I run only one part of the sequence in isolation or ir I run to refresh commands for the same DB it also works.

Any ideas?

3 REPLIES 3
martines
New Member

Many thanks for the reply and suggestion. I already tried that before and this is what I get:

 

The JSON DDL request failed with the following error: <ccon>Cannot execute the Refresh command: refreshing objects from multiple databases is not supported.</ccon>.

Technical Details:
RootActivityId: c4fb8dc0-1836-4b7c-add8-c33891671a31
Date (UTC): 1/12/2023 3:28:51 PM
0: PFError::SetLastError() line 2676 + 0x0 (Sql\Picasso\Engine\src\pf\eh\pferror.cpp)
1: PFSetLastError() line 3381 + 0x0 (Sql\Picasso\Engine\src\pf\eh\pferror.cpp)
2: ConvertExceptionsToPFResult<<lambda_d359256228571b4b16c28b1cea323c28> >() line 393 + 0x34 (Sql\Picasso\Engine\src\pf\kernel\shared\pfshmacros.inl)
3: PFSetLastErrorExTag() line 3964 + 0x21 (Sql\Picasso\Engine\src\pf\eh\pferror.cpp)
4: 0x00007FF87AD2D65E (symbolic name unavailable)

Run complete

well, that kinda answers your original question, no?  Albeit in a non-satisfactory way.

 

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.powerbi.com

lbendlin
Super User
Super User

how about 

{
	"sequence":
	{
		"maxParallelism": 1,
		"operations": [
			{
				"refresh": {
					"type": "calculate",
					"objects": [
					{
						"database": "DB1",
						"table": "Table1"
					},{
						"database": "DB2",
						"table": "Table1"
					}
				]
				}
			}
		]
	}
}

?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors