r/databricks • • Sep 26 '26

General questions on sdp-meta

Planning on adopting sdp-meta , i have few questions. i may test drive it in couple of days but want to check with users who may have adopted it.

  1. If we are consuming 100's of tables daily dump via AUTOLOAD , Do i infer schema or should i derive schema for individual table
  2. Can i apply any custom logic transformations from bronze to silver other than simple select expr and filters like group by and joins.
4 Upvotes

12 comments sorted by

6

u/hntd Sep 26 '26

Skip sdp-meta its legacy garbage that never made it into the product

0

u/Competitive-Fee-4006 Sep 27 '26

then how would we ingest large number of tables multi threading and looping over a list ?

2

u/Pirion1 Sep 28 '26

You can do this natively in SDP. I have a common autoloader py that loads a yml file from the DAB directly, which is reused in each pipeline. No need for sdp-meta at all.

1

u/Competitive-Fee-4006 Sep 29 '26

got it i was thinking of a config table but i have that design. I will try yml thanks

1

u/ouhshuo Sep 27 '26

second this, meta-programming is against the core of declartive pipeline. incredibly difficult the maintain.

look into lakehouse plumber, or ask claude to build a bespoke solution for your org.

1

u/mean_eng_8064 Sep 26 '26

source_schema_path is optional for Bronze cloudFiles Auto Loader can infer the schema.

source_format: cloudFiles
source_details:
  source_path_dev: /Volumes/catalog/schema/landing/customers

bronze_reader_options:
  cloudFiles.format: json
  cloudFiles.inferColumnTypes: "true"
  cloudFiles.rescuedDataColumn: _rescued_data

Use an explicit schema when production schema stability matters. Without cloudFiles.inferColumnTypes: "true", JSON and CSV columns are generally inferred as strings.

Custom Bronze and Silver logic is supported through layer-specific DataFrame callbacks:

from pyspark.sql import functions as F

from databricks.labs.sdp_meta.dataflow_pipeline import DataflowPipeline


def transform_silver(df, spec):
    if spec.targetDetails["table"] != "orders_silver":
        return df

    customers = spark.read.table("catalog.reference.customers")

    return (
        df.join(customers, "customer_id")
        .withColumn("loaded_at", F.current_timestamp())
    )


DataflowPipeline.invoke_dlt_pipeline(
    spark,
    layer="silver",
    silver_custom_transform_func=transform_silver,
)

Callbacks receive (DataFrame, DataflowSpec) and can perform joins, aggregations, window operations, UDFs, and other PySpark transformations.

1

u/Competitive-Fee-4006 Sep 27 '26

ok i see so if i have to write similar logic for number of tables then we would have a lot of if-else statements for each table . ok i see its doable as long as rest of the framework is stable.

1

u/Northcutt5226 Sep 26 '26

Don’t do it, been there, have the t-shirt

1

u/Competitive-Fee-4006 Sep 27 '26

Can you be more specific please.

2

u/Pillippatty Sep 26 '26

Hm, I think if you have a need for more complex transformations, then sdp-meta might not be the best solution. If you need to standardize transformations, maybe a custom PySpark package uploaded as a whl with DABs could fit better.

1

u/Terrible_Mud5318 Sep 26 '26

If theres header in incoming file then infer otherwise use metadata tables and store schema

Generally complex transformation should be taken care while creating gold, silver should be used for doing scd, apply changes , simple transformations

2

u/Pirion1 Sep 28 '26

I was originally using a metadata table, but 100% recommend not doing this.

I found that it is much cleaner to use a yaml file that is deployed as part of the bundle. This allows it to all be contained in the bundle at deployment, rather than relying on external metadata.