What are the challenges you face when working across database platforms? Take the survey
Options

Static data with wildcards

rickjr82rickjr82 Posts: 21
edited August 21, 2013 10:09AM in SQL Compare Previous Versions
Is it possible to compare/redeploy static data with wildcards?

i.e.

in DEV DB
name
env.property
value
DEV.value

in Prod DB
name
env.property
value
PROD.value

I would like a static data deploy to not see any difference between those rows

Also, I would be interested in transformations where if the above property didn't exist it would be generated automatically.

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I'm afraid I do not fully understand the question.

    When you deploy static data, meaning static data that you have linked to source control, it shows up as a series of INSERT statements, one for each individual row. You can't filter columns from that row.

    The intention is that static data is "seed" data that your database needs to function.

    Hopefully this helps.
  • Options
    What I am looking at is an environment specific properties table. Seed data which could be different based on my location.

    In all environments, I may need the same rows, but the correct values for each may(or may not) change depending on which environment I am in.

    For a property prop1 following the pattern prop.*.value

    In DEV:

    name value
    prop1 prop.DEV.value

    in UAT:
    prop1 prop.UAT.value



    I would want the that middle part to be ignored so I could make sure my properties are all there and not overwritten with incorrect values on deploy.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I can put in a suggestion for it but as it stands, SQL Source Control can't be configured to dynamically select a table for which to source control data. All I can think to do is have two different databases, one for each environment, and source control them into different repositories. Then tell SQL Compare to get the files from one repository or the other, depending on the localization settings.
  • Options
    Just to be clear, I don't want to support multiple tables and dynamically use one, I would like for the row comparison to consider 2 rows identical and not overwrite one.

    for: prop.*.value

    prop.DEV.value = prop.UAT.value
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Sorry I am not understanding this. I assumed "prop.Dev.value" was the name of a table.
  • Options
    Sent you a DM- might be easier to hash out over the phone
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    At any rate, this is a request for more functionality, so there is little I can do to make this work for you. It would be useful to understand the problem, though, so I can submit the request properly.
  • Options
    At any rate, this is a request for more functionality, so there is little I can do to make this work for you. It would be useful to understand the problem, though, so I can submit the request properly.

    How do you want to proceed? Do you want to call me, or should I continue posting?
Sign In or Register to comment.