create streaming table using variable file path

dataminion01
New Contributor II
is it possible to use a variable for the file path based on dates?
files are stores in folders in this format yyyy/mm
 
CREATE OR REFRESH STREAMING TABLE test
  AS SELECT * FROM STREAM read_files(
    "/Volumes/.....",
    format => "parquet"
  );

Rishabh-Pandey
Databricks MVP

@dataminion01  Yes, it is possible to use a variable or dynamic file path based on dates in some data processing frameworks , but not directly in static SQL DDL statements like CREATE OR REFRESH STREAMING TABLE unless the environment you're working enabled parameter substitution or dynamic SQL execution.

Rishabh Pandey