def export(self, main: DataFrame, meta: DataFrame, target_location: str):
"""
Create metadata DataFrame
"""
export_path = self.config.resolve_gold(target_location)
meta_path = self.config.resolve_meta(target_location)
main.write.format(self.config.format).mode("overwrite").save(export_path)
meta.write.format(self.config.format).mode("overwrite").save(meta_path)
return {"main": main, "meta": meta}
def meta(
self, spark, import_id: str, entities: list, data: dict = {}
) -> DataFrame:
"""
Create metadata DataFrame
"""
schema = DataHelper.__schema
job_type = 'spark' if self.config.spark_env else 'databricks'
return spark.createDataFrame(
[
(
import_id,
"v1.import.md",
datetime.datetime.now(),
entities,
self.config.task_id,
job_type,
data,
)
],
schema,
)
Transform your raw data into actionable insights with powerful and scalable data pipelines built on Azure Databricks. We help you ingest, process, and analyze large volumes of data from various sources, enabling advanced analytics, machine learning, and real-time data applications. Unlock the full potential of your data assets with our Databricks and Data Factory expertise.
Empower your organization with compelling data visualizations and interactive dashboards using Microsoft Power BI. We help you connect to diverse data sources, transform data into meaningful insights, and create intuitive reports that enable data-driven decision-making. From simple reports to complex analytical solutions, we make your data speak.
We use cookies to improve your experience. By continuing to browse, you agree to our Privacy Policy