@@ -18,6 +18,7 @@ def catalog(metadata: MetaData) -> tuple[Table, Table]:
1818 Column ("data_table" , String (255 ), nullable = False , unique = True ),
1919 Column ("source_format" , String (16 ), nullable = False ),
2020 Column ("source_name" , Text , nullable = False ),
21+ Column ("source_table_name" , Text ),
2122 Column ("source_sha256" , String (64 ), nullable = False ),
2223 Column ("source_created_at" , String (40 )),
2324 Column ("source_modified_at" , String (40 )),
@@ -35,6 +36,7 @@ def catalog(metadata: MetaData) -> tuple[Table, Table]:
3536 Column ("source_name" , String (255 ), nullable = False ),
3637 Column ("physical_name" , String (255 ), nullable = False ),
3738 Column ("storage_kind" , String (16 ), nullable = False ),
39+ Column ("readstat_storage_type" , String (32 )),
3840 Column ("string_width" , Integer ),
3941 Column ("label" , Text , nullable = False , default = "" ),
4042 Column ("format" , String (64 )),
@@ -96,6 +98,7 @@ def create_wide_dataset(
9698 * , database_url : str , dataset_id : str , source_name : str , source_format : str ,
9799 rows : Iterable [Mapping [str , Any ]], variables : list [dict [str , Any ]], file_label : str = "" ,
98100 source_encoding : str | None = None , documents : str = "[]" ,
101+ source_table_name : str | None = None ,
99102 source_sha256 : str = "" ,
100103 source_created_at : str | None = None , source_modified_at : str | None = None ,
101104 imported_at : str = "" ,
@@ -124,6 +127,7 @@ def create_wide_dataset(
124127 connection .execute (insert (datasets ).values (
125128 dataset_id = dataset_id , data_table = data_table .name , source_format = source_format ,
126129 source_name = source_name , source_encoding = source_encoding , case_count = len (materialized ),
130+ source_table_name = source_table_name ,
127131 source_sha256 = source_sha256 ,
128132 source_created_at = source_created_at , source_modified_at = source_modified_at ,
129133 imported_at = imported_at ,
0 commit comments