3

The goal is refresh one named partition and other objects with default "partition" schema(other tables don't have partitions) without definition tables.

etc:

{
  "refresh": {
    "type": "full",
    "objects": [
         {
        "database": "Database",
        "table": "Table1",
        "partition": "P1"
      },
      {
        "database": "Database",
        "partition": "partition"
      }
    ]
  }
}

This is our actual code:

{
  "refresh": {
    "type": "full",
    "objects": [
         {
        "database": "Database",
        "table": "Table1",
        "partition": "P1"
      },
      //This code is confusing
      {
        "database": "Database",
        "table": "Table2"
      },
      {
        "database": "Database",
        "table": "Table3"
      }
      ....
      //
    ]
  }
}

1 Answers1

0

Your code is perfectly valid. All tables have at least one partition. For your purposes here, you can think of a table as a container for one or more partitions.

So, when you execute a refresh command, you have to define what objects in the model will be refreshed. In your case

{
  // the command you will run, "refresh"
  "refresh": {
    // The type of refresh, "full"
    "type": "full",
    // The scope of your command, an array of objects which will be refreshed
    "objects": [
         // First object, a single partition, "P1" in the table "Table1"
         {
        "database": "Database",
        "table": "Table1",
        "partition": "P1"
      },
      // The second object, the table "Table2" (technically, all partitions in "Table2",
      // which in your case is 1 default partition)
      {
        "database": "Database",
        "table": "Table2"
      },
      // The third object to be processed, "Table3"
      {
        "database": "Database",
        "table": "Table3"
      }
      // More objects to be processed 
      , ...
      //
    ]
  }
}

You can't define a command that is "One partition and all other things in the cube". You can define an array of things that is explicitly made up of the single partition and each individual table.

greggyb
  • 3,728
  • 1
  • 11
  • 32